mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Merge m-c to inbound, a=merge
MozReview-Commit-ID: 1c81Eie63Pe
This commit is contained in:
commit
f85117da36
@ -92,7 +92,8 @@ var gBrowserThumbnails = {
|
||||
|
||||
_capture: function Thumbnails_capture(aBrowser) {
|
||||
// Only capture about:newtab top sites.
|
||||
if (this._topSiteURLs.indexOf(aBrowser.currentURI.spec) == -1)
|
||||
if (!aBrowser.currentURI ||
|
||||
this._topSiteURLs.indexOf(aBrowser.currentURI.spec) == -1)
|
||||
return;
|
||||
this._shouldCapture(aBrowser, function(aResult) {
|
||||
if (aResult) {
|
||||
|
@ -142,9 +142,13 @@ var gGrid = {
|
||||
|
||||
// Create sites.
|
||||
let numLinks = Math.min(links.length, cells.length);
|
||||
let hasHistoryTiles = false;
|
||||
for (let i = 0; i < numLinks; i++) {
|
||||
if (links[i]) {
|
||||
this.createSite(links[i], cells[i]);
|
||||
if (links[i].type == "history") {
|
||||
hasHistoryTiles = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,6 +157,9 @@ var gGrid = {
|
||||
this._gridDefaultContent.nextSibling.remove();
|
||||
}
|
||||
this._node.appendChild(fragment);
|
||||
|
||||
document.getElementById("topsites-heading").textContent =
|
||||
newTabString(hasHistoryTiles ? "userTopSites.heading" : "defaultTopSites.heading");
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@
|
||||
<div id="newtab-horizontal-margin">
|
||||
<div class="newtab-side-margin"/>
|
||||
<div id="newtab-grid">
|
||||
<h1 id="topsites-heading">&newtab.topSites.heading;</h1>
|
||||
<h1 id="topsites-heading"/>
|
||||
</div>
|
||||
<div class="newtab-side-margin"/>
|
||||
</div>
|
||||
|
@ -120,8 +120,12 @@ function* interactiveUpdateTest(autoUpdate, checkFn) {
|
||||
if (manualUpdatePromise) {
|
||||
yield manualUpdatePromise;
|
||||
|
||||
let item = win.document.getElementById("addon-list")
|
||||
.children.find(_item => _item.value == ID);
|
||||
let list = win.document.getElementById("addon-list");
|
||||
|
||||
// Make sure we have XBL bindings
|
||||
list.clientHeight;
|
||||
|
||||
let item = list.children.find(_item => _item.value == ID);
|
||||
EventUtils.synthesizeMouseAtCenter(item._updateBtn, {}, win);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
|
||||
"@mozilla.org/browser/aboutnewtab-service;1",
|
||||
"nsIAboutNewTabService");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||
"resource://gre/modules/Preferences.jsm");
|
||||
|
||||
// Bug 1320736 tracks creating a generic precedence manager for handling
|
||||
// multiple addons modifying the same properties, and bug 1330494 has been filed
|
||||
@ -17,32 +19,85 @@ XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
|
||||
let overrides = {
|
||||
// A queue of extensions in line to override the newtab page (sorted oldest to newest).
|
||||
newtab: [],
|
||||
// A queue of extensions in line to override the home page (sorted oldest to newest).
|
||||
home: [],
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the specified page to its default value.
|
||||
*
|
||||
* @param {string} page The page to override. Accepted values are "newtab" and "home".
|
||||
*/
|
||||
function resetPage(page) {
|
||||
switch (page) {
|
||||
case "newtab":
|
||||
aboutNewTabService.resetNewTabURL();
|
||||
break;
|
||||
case "home":
|
||||
Preferences.reset("browser.startup.homepage");
|
||||
break;
|
||||
default:
|
||||
throw new Error("Unrecognized override type");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the specified page to the specified URL.
|
||||
*
|
||||
* @param {string} page The page to override. Accepted values are "newtab" and "home".
|
||||
* @param {string} url The resolved URL to use for the page override.
|
||||
*/
|
||||
function overridePage(page, url) {
|
||||
switch (page) {
|
||||
case "newtab":
|
||||
aboutNewTabService.newTabURL = url;
|
||||
break;
|
||||
case "home":
|
||||
Preferences.set("browser.startup.homepage", url);
|
||||
break;
|
||||
default:
|
||||
throw new Error("Unrecognized override type");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the page to the URL specified by the extension next in line. If no extensions
|
||||
* are in line, the page is reset to its default value.
|
||||
*
|
||||
* @param {string} page The page to override.
|
||||
*/
|
||||
function updatePage(page) {
|
||||
if (overrides[page].length) {
|
||||
overridePage(page, overrides[page][0].url);
|
||||
} else {
|
||||
resetPage(page);
|
||||
}
|
||||
}
|
||||
|
||||
/* eslint-disable mozilla/balanced-listeners */
|
||||
extensions.on("manifest_chrome_url_overrides", (type, directive, extension, manifest) => {
|
||||
if (manifest.chrome_url_overrides.newtab) {
|
||||
let newtab = manifest.chrome_url_overrides.newtab;
|
||||
let url = extension.baseURI.resolve(newtab);
|
||||
if (Object.keys(overrides).length > 1) {
|
||||
extension.manifestError("Extensions can override only one page.");
|
||||
}
|
||||
|
||||
// Only set the newtab URL if no other extension is overriding it.
|
||||
if (!overrides.newtab.length) {
|
||||
aboutNewTabService.newTabURL = url;
|
||||
for (let page of Object.keys(overrides)) {
|
||||
if (manifest.chrome_url_overrides[page]) {
|
||||
let relativeURL = manifest.chrome_url_overrides[page];
|
||||
let url = extension.baseURI.resolve(relativeURL);
|
||||
// Store the extension ID instead of a hard reference to the extension.
|
||||
overrides[page].push({id: extension.id, url});
|
||||
updatePage(page);
|
||||
break;
|
||||
}
|
||||
|
||||
overrides.newtab.push({extension, url});
|
||||
}
|
||||
});
|
||||
|
||||
extensions.on("shutdown", (type, extension) => {
|
||||
let i = overrides.newtab.findIndex(o => o.extension === extension);
|
||||
if (i !== -1) {
|
||||
overrides.newtab.splice(i, 1);
|
||||
|
||||
if (overrides.newtab.length) {
|
||||
aboutNewTabService.newTabURL = overrides.newtab[0].url;
|
||||
} else {
|
||||
aboutNewTabService.resetNewTabURL();
|
||||
for (let page of Object.keys(overrides)) {
|
||||
let i = overrides[page].findIndex(o => o.id === extension.id);
|
||||
if (i !== -1) {
|
||||
overrides[page].splice(i, 1);
|
||||
updatePage(page);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -14,6 +14,11 @@
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"home": {
|
||||
"$ref": "ExtensionURL",
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"bookmarks": {
|
||||
"unsupported": true,
|
||||
"$ref": "ExtensionURL",
|
||||
|
@ -114,7 +114,9 @@ support-files =
|
||||
[browser_ext_themes_dynamic_updates.js]
|
||||
[browser_ext_themes_lwtsupport.js]
|
||||
[browser_ext_topwindowid.js]
|
||||
[browser_ext_url_overrides.js]
|
||||
[browser_ext_url_overrides_all.js]
|
||||
[browser_ext_url_overrides_home.js]
|
||||
[browser_ext_url_overrides_newtab.js]
|
||||
[browser_ext_webRequest.js]
|
||||
[browser_ext_webNavigation_frameId0.js]
|
||||
[browser_ext_webNavigation_getFrames.js]
|
||||
|
@ -0,0 +1,97 @@
|
||||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "aboutNewTabService",
|
||||
"@mozilla.org/browser/aboutnewtab-service;1",
|
||||
"nsIAboutNewTabService");
|
||||
|
||||
const NEWTAB_URI = "webext-newtab.html";
|
||||
const HOME_URI = "webext-home.html";
|
||||
|
||||
add_task(function* test_extensions_overriding_different_pages() {
|
||||
let defaultHomePage = Preferences.get("browser.startup.homepage");
|
||||
let defaultNewtabPage = aboutNewTabService.newTabURL;
|
||||
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should be ${defaultHomePage}`);
|
||||
is(aboutNewTabService.newTabURL, defaultNewtabPage,
|
||||
`Default newtab url should be ${defaultNewtabPage}`);
|
||||
|
||||
let ext1 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {}},
|
||||
});
|
||||
|
||||
let ext2 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {newtab: NEWTAB_URI}},
|
||||
});
|
||||
|
||||
let ext3 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {home: HOME_URI}},
|
||||
});
|
||||
|
||||
yield ext1.startup();
|
||||
|
||||
is(aboutNewTabService.newTabURL, defaultNewtabPage,
|
||||
`Default newtab url should still be ${defaultNewtabPage}`);
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should be ${defaultHomePage}`);
|
||||
|
||||
yield ext2.startup();
|
||||
|
||||
ok(aboutNewTabService.newTabURL.endsWith(NEWTAB_URI),
|
||||
"Newtab url should be overriden by the second extension.");
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should be ${defaultHomePage}`);
|
||||
|
||||
yield ext1.unload();
|
||||
|
||||
ok(aboutNewTabService.newTabURL.endsWith(NEWTAB_URI),
|
||||
"Newtab url should still be overriden by the second extension.");
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should be ${defaultHomePage}`);
|
||||
|
||||
yield ext3.startup();
|
||||
|
||||
ok(aboutNewTabService.newTabURL.endsWith(NEWTAB_URI),
|
||||
"Newtab url should still be overriden by the second extension.");
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI),
|
||||
"Home url should be overriden by the third extension.");
|
||||
|
||||
yield ext2.unload();
|
||||
|
||||
is(aboutNewTabService.newTabURL, defaultNewtabPage,
|
||||
`Newtab url should be reset to ${defaultNewtabPage}`);
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI),
|
||||
"Home url should still be overriden by the third extension.");
|
||||
|
||||
yield ext3.unload();
|
||||
|
||||
is(aboutNewTabService.newTabURL, defaultNewtabPage,
|
||||
`Newtab url should be reset to ${defaultNewtabPage}`);
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Home url should be reset to ${defaultHomePage}`);
|
||||
});
|
||||
|
||||
add_task(function* test_extensions_with_multiple_overrides() {
|
||||
let ext = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {
|
||||
newtab: NEWTAB_URI,
|
||||
home: HOME_URI,
|
||||
}},
|
||||
});
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
let waitForConsole = new Promise(resolve => {
|
||||
SimpleTest.monitorConsole(resolve, [{
|
||||
message: /Extensions can override only one page./,
|
||||
}]);
|
||||
});
|
||||
|
||||
yield ext.startup();
|
||||
yield ext.unload();
|
||||
|
||||
SimpleTest.endMonitorConsole();
|
||||
yield waitForConsole;
|
||||
});
|
@ -0,0 +1,74 @@
|
||||
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set sts=2 sw=2 et tw=80: */
|
||||
|
||||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||
"resource://gre/modules/Preferences.jsm");
|
||||
|
||||
const HOME_URI_1 = "webext-home-1.html";
|
||||
const HOME_URI_2 = "webext-home-2.html";
|
||||
const HOME_URI_3 = "webext-home-3.html";
|
||||
|
||||
add_task(function* test_multiple_extensions_overriding_newtab_page() {
|
||||
let defaultHomePage = Preferences.get("browser.startup.homepage");
|
||||
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should be ${defaultHomePage}`);
|
||||
|
||||
let ext1 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {}},
|
||||
});
|
||||
|
||||
let ext2 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {home: HOME_URI_1}},
|
||||
});
|
||||
|
||||
let ext3 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {home: HOME_URI_2}},
|
||||
});
|
||||
|
||||
let ext4 = ExtensionTestUtils.loadExtension({
|
||||
manifest: {"chrome_url_overrides": {home: HOME_URI_3}},
|
||||
});
|
||||
|
||||
yield ext1.startup();
|
||||
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Default home url should still be ${defaultHomePage}`);
|
||||
|
||||
yield ext2.startup();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_1),
|
||||
"Home url should be overriden by the second extension.");
|
||||
|
||||
yield ext1.unload();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_1),
|
||||
"Home url should still be overriden by the second extension.");
|
||||
|
||||
yield ext3.startup();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_1),
|
||||
"Home url should still be overriden by the second extension.");
|
||||
|
||||
yield ext2.unload();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_2),
|
||||
"Home url should be overriden by the third extension.");
|
||||
|
||||
yield ext4.startup();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_2),
|
||||
"Home url should be overriden by the third extension.");
|
||||
|
||||
yield ext4.unload();
|
||||
|
||||
ok(Preferences.get("browser.startup.homepage").endsWith(HOME_URI_2),
|
||||
"Home url should be overriden by the third extension.");
|
||||
|
||||
yield ext3.unload();
|
||||
|
||||
is(Preferences.get("browser.startup.homepage"), defaultHomePage,
|
||||
`Home url should be reset to ${defaultHomePage}`);
|
||||
});
|
@ -76,11 +76,11 @@ add_task(function* test_sending_message_from_newtab_page() {
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"chrome_url_overrides": {
|
||||
newtab: NEWTAB_URI_2,
|
||||
newtab: NEWTAB_URI_1,
|
||||
},
|
||||
},
|
||||
files: {
|
||||
[NEWTAB_URI_2]: `
|
||||
[NEWTAB_URI_1]: `
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<meta charset="utf-8"/></head>
|
@ -4,7 +4,6 @@
|
||||
|
||||
<!-- These strings are used in the about:newtab page -->
|
||||
<!ENTITY newtab.pageTitle "New Tab">
|
||||
<!ENTITY newtab.topSites.heading "Your Top Sites">
|
||||
<!ENTITY newtab.customize.classic "Show your top sites">
|
||||
<!ENTITY newtab.customize.cog.enhanced "Include suggested sites">
|
||||
<!ENTITY newtab.customize.cog.title2 "NEW TAB CONTROLS">
|
||||
|
@ -2,6 +2,9 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
newtab.defaultTopSites.heading=Top Sites
|
||||
newtab.userTopSites.heading=Your Top Sites
|
||||
|
||||
newtab.pin=Pin this site at its current position
|
||||
newtab.unpin=Unpin this site
|
||||
newtab.block=Remove this site
|
||||
|
@ -13048,7 +13048,7 @@ ArrayContainsTable(const nsTArray<nsCString>& aTableArray,
|
||||
* For more information, see
|
||||
* toolkit/components/url-classifier/flash-block-lists.rst
|
||||
*/
|
||||
nsIDocument::FlashClassification
|
||||
FlashClassification
|
||||
nsDocument::PrincipalFlashClassification(bool aIsTopLevel)
|
||||
{
|
||||
nsresult rv;
|
||||
@ -13137,7 +13137,7 @@ nsDocument::PrincipalFlashClassification(bool aIsTopLevel)
|
||||
return FlashClassification::Unknown;
|
||||
}
|
||||
|
||||
nsIDocument::FlashClassification
|
||||
FlashClassification
|
||||
nsDocument::ComputeFlashClassification()
|
||||
{
|
||||
nsCOMPtr<nsIDocShellTreeItem> current = this->GetDocShell();
|
||||
@ -13186,7 +13186,7 @@ nsDocument::ComputeFlashClassification()
|
||||
*
|
||||
* This function will NOT return FlashClassification::Unclassified
|
||||
*/
|
||||
nsIDocument::FlashClassification
|
||||
FlashClassification
|
||||
nsDocument::DocumentFlashClassification()
|
||||
{
|
||||
if (mFlashClassification == FlashClassification::Unclassified) {
|
||||
|
@ -1305,7 +1305,7 @@ protected:
|
||||
|
||||
void UpdateScreenOrientation();
|
||||
|
||||
virtual FlashClassification DocumentFlashClassification() override;
|
||||
virtual mozilla::dom::FlashClassification DocumentFlashClassification() override;
|
||||
|
||||
#define NS_DOCUMENT_NOTIFY_OBSERVERS(func_, params_) \
|
||||
NS_OBSERVER_ARRAY_NOTIFY_XPCOM_OBSERVERS(mObservers, nsIDocumentObserver, \
|
||||
@ -1329,11 +1329,11 @@ protected:
|
||||
|
||||
// Retrieves the classification of the Flash plugins in the document based on
|
||||
// the classification lists.
|
||||
FlashClassification PrincipalFlashClassification(bool aIsTopLevel);
|
||||
mozilla::dom::FlashClassification PrincipalFlashClassification(bool aIsTopLevel);
|
||||
|
||||
// Attempts to determine the Flash classification of this page based on the
|
||||
// the classification lists and the classification of parent documents.
|
||||
FlashClassification ComputeFlashClassification();
|
||||
mozilla::dom::FlashClassification ComputeFlashClassification();
|
||||
|
||||
nsTArray<nsIObserver*> mCharSetObservers;
|
||||
|
||||
@ -1379,7 +1379,7 @@ protected:
|
||||
// non-null when this document is in fullscreen mode.
|
||||
nsWeakPtr mFullscreenRoot;
|
||||
|
||||
FlashClassification mFlashClassification;
|
||||
mozilla::dom::FlashClassification mFlashClassification;
|
||||
private:
|
||||
static bool CustomElementConstructor(JSContext* aCx, unsigned aArgc, JS::Value* aVp);
|
||||
|
||||
|
@ -2893,14 +2893,7 @@ public:
|
||||
|
||||
// For more information on Flash classification, see
|
||||
// toolkit/components/url-classifier/flash-block-lists.rst
|
||||
enum class FlashClassification {
|
||||
Unclassified, // Denotes a classification that has not yet been computed.
|
||||
// Allows for lazy classification.
|
||||
Unknown, // Site is not on the whitelist or blacklist
|
||||
Allowed, // Site is on the Flash whitelist
|
||||
Denied // Site is on the Flash blacklist
|
||||
};
|
||||
virtual FlashClassification DocumentFlashClassification() = 0;
|
||||
virtual mozilla::dom::FlashClassification DocumentFlashClassification() = 0;
|
||||
|
||||
protected:
|
||||
bool GetUseCounter(mozilla::UseCounter aUseCounter)
|
||||
|
@ -3336,11 +3336,11 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
NS_ENSURE_TRUE(topDoc, false);
|
||||
|
||||
// Check the flash blocking status for this page (this applies to Flash only)
|
||||
nsIDocument::FlashClassification documentClassification = nsIDocument::FlashClassification::Allowed;
|
||||
FlashClassification documentClassification = FlashClassification::Allowed;
|
||||
if (IsFlashMIME(mContentType)) {
|
||||
documentClassification = ownerDoc->DocumentFlashClassification();
|
||||
}
|
||||
if (documentClassification == nsIDocument::FlashClassification::Denied) {
|
||||
if (documentClassification == FlashClassification::Denied) {
|
||||
aReason = eFallbackSuppressed;
|
||||
return false;
|
||||
}
|
||||
@ -3413,7 +3413,7 @@ nsObjectLoadingContent::ShouldPlay(FallbackType &aReason, bool aIgnoreCurrentTyp
|
||||
|
||||
switch (enabledState) {
|
||||
case nsIPluginTag::STATE_ENABLED:
|
||||
return documentClassification == nsIDocument::FlashClassification::Allowed;
|
||||
return documentClassification == FlashClassification::Allowed;
|
||||
case nsIPluginTag::STATE_CLICKTOPLAY:
|
||||
return false;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ class ImageContainer;
|
||||
} // namespace layers
|
||||
|
||||
class MediaByteBuffer;
|
||||
class SharedTrackInfo;
|
||||
class TrackInfoSharedPtr;
|
||||
|
||||
// AlignedBuffer:
|
||||
// Memory allocations are fallibles. Methods return a boolean indicating if
|
||||
@ -672,7 +672,7 @@ public:
|
||||
// trimmed.
|
||||
uint32_t mDiscardPadding = 0;
|
||||
|
||||
RefPtr<SharedTrackInfo> mTrackInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mTrackInfo;
|
||||
|
||||
// Return a deep copy or nullptr if out of memory.
|
||||
virtual already_AddRefed<MediaRawData> Clone() const;
|
||||
|
@ -289,6 +289,10 @@ public:
|
||||
{
|
||||
return mDecoder->SupportDecoderRecycling();
|
||||
}
|
||||
void ConfigurationChanged(const TrackInfo& aConfig) override
|
||||
{
|
||||
mDecoder->ConfigurationChanged(aConfig);
|
||||
}
|
||||
RefPtr<ShutdownPromise> Shutdown() override
|
||||
{
|
||||
RefPtr<MediaDataDecoder> decoder = mDecoder.forget();
|
||||
@ -1757,22 +1761,18 @@ MediaFormatReader::HandleDemuxedSamples(
|
||||
// Decode all our demuxed frames.
|
||||
while (decoder.mQueuedSamples.Length()) {
|
||||
RefPtr<MediaRawData> sample = decoder.mQueuedSamples[0];
|
||||
RefPtr<SharedTrackInfo> info = sample->mTrackInfo;
|
||||
RefPtr<TrackInfoSharedPtr> info = sample->mTrackInfo;
|
||||
|
||||
if (info && decoder.mLastStreamSourceID != info->GetID()) {
|
||||
bool supportRecycling = MediaPrefs::MediaDecoderCheckRecycling()
|
||||
&& decoder.mDecoder->SupportDecoderRecycling();
|
||||
if (decoder.mNextStreamSourceID.isNothing()
|
||||
|| decoder.mNextStreamSourceID.ref() != info->GetID()) {
|
||||
if (!supportRecycling) {
|
||||
LOG("%s stream id has changed from:%d to:%d, draining decoder.",
|
||||
TrackTypeToStr(aTrack), decoder.mLastStreamSourceID,
|
||||
info->GetID());
|
||||
decoder.RequestDrain();
|
||||
decoder.mNextStreamSourceID = Some(info->GetID());
|
||||
ScheduleUpdate(aTrack);
|
||||
return;
|
||||
}
|
||||
LOG("%s stream id has changed from:%d to:%d, draining decoder.",
|
||||
TrackTypeToStr(aTrack), decoder.mLastStreamSourceID,
|
||||
info->GetID());
|
||||
decoder.RequestDrain();
|
||||
decoder.mNextStreamSourceID = Some(info->GetID());
|
||||
ScheduleUpdate(aTrack);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG("%s stream id has changed from:%d to:%d.",
|
||||
@ -1780,9 +1780,9 @@ MediaFormatReader::HandleDemuxedSamples(
|
||||
info->GetID());
|
||||
decoder.mLastStreamSourceID = info->GetID();
|
||||
decoder.mNextStreamSourceID.reset();
|
||||
decoder.mInfo = info;
|
||||
|
||||
if (!supportRecycling) {
|
||||
if (!MediaPrefs::MediaDecoderCheckRecycling()
|
||||
|| !decoder.mDecoder->SupportDecoderRecycling()) {
|
||||
LOG("Decoder does not support recycling, recreate decoder.");
|
||||
// If flushing is required, it will clear our array of queued samples.
|
||||
// So make a copy now.
|
||||
@ -1791,8 +1791,13 @@ MediaFormatReader::HandleDemuxedSamples(
|
||||
if (sample->mKeyframe) {
|
||||
decoder.mQueuedSamples.AppendElements(Move(samples));
|
||||
}
|
||||
} else if (decoder.mInfo && *decoder.mInfo != *info) {
|
||||
const TrackInfo* trackInfo = *info;
|
||||
decoder.mDecoder->ConfigurationChanged(*trackInfo);
|
||||
}
|
||||
|
||||
decoder.mInfo = info;
|
||||
|
||||
if (sample->mKeyframe) {
|
||||
ScheduleUpdate(aTrack);
|
||||
} else {
|
||||
|
@ -423,7 +423,7 @@ private:
|
||||
Maybe<media::TimeUnit> mLastTimeRangesEnd;
|
||||
// TrackInfo as first discovered during ReadMetadata.
|
||||
UniquePtr<TrackInfo> mOriginalInfo;
|
||||
RefPtr<SharedTrackInfo> mInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mInfo;
|
||||
Maybe<media::TimeUnit> mFirstDemuxedSampleTime;
|
||||
// Use BlankDecoderModule or not.
|
||||
bool mIsBlankDecode;
|
||||
|
@ -540,11 +540,11 @@ public:
|
||||
media::TimeUnit mStartTime;
|
||||
};
|
||||
|
||||
class SharedTrackInfo
|
||||
class TrackInfoSharedPtr
|
||||
{
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedTrackInfo)
|
||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TrackInfoSharedPtr)
|
||||
public:
|
||||
SharedTrackInfo(const TrackInfo& aOriginal, uint32_t aStreamID)
|
||||
TrackInfoSharedPtr(const TrackInfo& aOriginal, uint32_t aStreamID)
|
||||
: mInfo(aOriginal.Clone())
|
||||
, mStreamSourceID(aStreamID)
|
||||
, mMimeType(mInfo->mMimeType)
|
||||
@ -556,6 +556,11 @@ public:
|
||||
return mStreamSourceID;
|
||||
}
|
||||
|
||||
operator const TrackInfo*() const
|
||||
{
|
||||
return mInfo.get();
|
||||
}
|
||||
|
||||
const TrackInfo* operator*() const
|
||||
{
|
||||
return mInfo.get();
|
||||
@ -583,7 +588,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
~SharedTrackInfo() { }
|
||||
~TrackInfoSharedPtr() { }
|
||||
UniquePtr<TrackInfo> mInfo;
|
||||
// A unique ID, guaranteed to change when changing streams.
|
||||
uint32_t mStreamSourceID;
|
||||
|
@ -1037,7 +1037,7 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
|
||||
// 11. Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the AudioTrackList object referenced by the audioTracks attribute on the HTMLMediaElement.
|
||||
mAudioTracks.mBuffers.AppendElement(TrackBuffer());
|
||||
// 10. Add the track description for this track to the track buffer.
|
||||
mAudioTracks.mInfo = new SharedTrackInfo(info.mAudio, streamID);
|
||||
mAudioTracks.mInfo = new TrackInfoSharedPtr(info.mAudio, streamID);
|
||||
mAudioTracks.mLastInfo = mAudioTracks.mInfo;
|
||||
}
|
||||
|
||||
@ -1069,7 +1069,7 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
|
||||
// 11. Queue a task to fire a trusted event named addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent interface, at the VideoTrackList object referenced by the videoTracks attribute on the HTMLMediaElement.
|
||||
mVideoTracks.mBuffers.AppendElement(TrackBuffer());
|
||||
// 10. Add the track description for this track to the track buffer.
|
||||
mVideoTracks.mInfo = new SharedTrackInfo(info.mVideo, streamID);
|
||||
mVideoTracks.mInfo = new TrackInfoSharedPtr(info.mVideo, streamID);
|
||||
mVideoTracks.mLastInfo = mVideoTracks.mInfo;
|
||||
}
|
||||
// 4. For each text track in the initialization segment, run following steps:
|
||||
@ -1082,8 +1082,8 @@ TrackBuffersManager::OnDemuxerInitDone(nsresult)
|
||||
// 6. Set first initialization segment received flag to true.
|
||||
mFirstInitializationSegmentReceived = true;
|
||||
} else {
|
||||
mAudioTracks.mLastInfo = new SharedTrackInfo(info.mAudio, streamID);
|
||||
mVideoTracks.mLastInfo = new SharedTrackInfo(info.mVideo, streamID);
|
||||
mAudioTracks.mLastInfo = new TrackInfoSharedPtr(info.mAudio, streamID);
|
||||
mVideoTracks.mLastInfo = new TrackInfoSharedPtr(info.mVideo, streamID);
|
||||
}
|
||||
|
||||
UniquePtr<EncryptionInfo> crypto = mInputDemuxer->GetCrypto();
|
||||
|
@ -334,9 +334,9 @@ private:
|
||||
// Byte size of all samples contained in this track buffer.
|
||||
uint32_t mSizeBuffer;
|
||||
// TrackInfo of the first metadata received.
|
||||
RefPtr<SharedTrackInfo> mInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mInfo;
|
||||
// TrackInfo of the last metadata parsed (updated with each init segment.
|
||||
RefPtr<SharedTrackInfo> mLastInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mLastInfo;
|
||||
|
||||
// If set, position of the next sample to be retrieved by GetSample().
|
||||
// If the position is equal to the TrackBuffer's length, it indicates that
|
||||
|
@ -725,7 +725,7 @@ OggDemuxer::ReadOggChain(const media::TimeUnit& aLastEndTime)
|
||||
}
|
||||
// Setup a new TrackInfo so that the MediaFormatReader will flush the
|
||||
// current decoder.
|
||||
mSharedAudioTrackInfo = new SharedTrackInfo(mInfo.mAudio, ++sStreamSourceID);
|
||||
mSharedAudioTrackInfo = new TrackInfoSharedPtr(mInfo.mAudio, ++sStreamSourceID);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ private:
|
||||
// It is updated once a chained ogg is encountered.
|
||||
// As Ogg chaining is only supported for audio, we only need an audio track
|
||||
// info.
|
||||
RefPtr<SharedTrackInfo> mSharedAudioTrackInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mSharedAudioTrackInfo;
|
||||
|
||||
friend class OggTrackDemuxer;
|
||||
};
|
||||
|
@ -141,8 +141,9 @@ public:
|
||||
virtual nsresult Startup() { return NS_OK; };
|
||||
|
||||
// Indicates if the PlatformDecoderModule supports decoding of aMimeType.
|
||||
virtual bool SupportsMimeType(const nsACString& aMimeType,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const = 0;
|
||||
virtual bool SupportsMimeType(
|
||||
const nsACString& aMimeType,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const = 0;
|
||||
virtual bool Supports(const TrackInfo& aTrackInfo,
|
||||
DecoderDoctorDiagnostics* aDiagnostics) const
|
||||
{
|
||||
@ -161,11 +162,12 @@ public:
|
||||
// Indicates that the decoder requires a specific format.
|
||||
// The PlatformDecoderModule will convert the demuxed data accordingly before
|
||||
// feeding it to MediaDataDecoder::Input.
|
||||
virtual ConversionRequired DecoderNeedsConversion(const TrackInfo& aConfig) const = 0;
|
||||
virtual ConversionRequired DecoderNeedsConversion(
|
||||
const TrackInfo& aConfig) const = 0;
|
||||
|
||||
protected:
|
||||
PlatformDecoderModule() {}
|
||||
virtual ~PlatformDecoderModule() {}
|
||||
PlatformDecoderModule() { }
|
||||
virtual ~PlatformDecoderModule() { }
|
||||
|
||||
friend class H264Converter;
|
||||
friend class PDMFactory;
|
||||
@ -276,7 +278,10 @@ public:
|
||||
// Called from the state machine task queue or main thread. Decoder needs to
|
||||
// decide whether or not hardware acceleration is supported after creating.
|
||||
// It doesn't need to call Init() before calling this function.
|
||||
virtual bool IsHardwareAccelerated(nsACString& aFailureReason) const { return false; }
|
||||
virtual bool IsHardwareAccelerated(nsACString& aFailureReason) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Return the name of the MediaDataDecoder, only used for decoding.
|
||||
// Only return a static const string, as the information may be accessed
|
||||
@ -296,6 +301,21 @@ public:
|
||||
// Reuse the decoder if the decoder support recycling.
|
||||
// Currently, only Android video decoder will return true.
|
||||
virtual bool SupportDecoderRecycling() const { return false; }
|
||||
|
||||
// ConfigurationChanged will be called to inform the video or audio decoder
|
||||
// that the format of the next input sample is about to change.
|
||||
// If video decoder, aConfig will be a VideoInfo object.
|
||||
// If audio decoder, aConfig will be a AudioInfo object.
|
||||
// It is not safe to store a reference to this object and the decoder must
|
||||
// make a copy.
|
||||
// Care should be taken as ConfigurationChanged is called on the reader's
|
||||
// taskqueue.
|
||||
virtual void ConfigurationChanged(const TrackInfo& aConfig)
|
||||
{
|
||||
MOZ_ASSERT(SupportDecoderRecycling(),
|
||||
"Can only work with a decoder supporting recycling.");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "VideoUtils.h"
|
||||
#include "VPXDecoder.h"
|
||||
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsPromiseFlatString.h"
|
||||
#include "nsIGfxInfo.h"
|
||||
@ -80,8 +81,9 @@ public:
|
||||
{
|
||||
if (!mCanceled) {
|
||||
HandleError(
|
||||
aIsFatal ? MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)
|
||||
: MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__));
|
||||
aIsFatal
|
||||
? MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR, __func__)
|
||||
: MediaResult(NS_ERROR_DOM_MEDIA_DECODE_ERR, __func__));
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,7 +147,7 @@ public:
|
||||
|
||||
void HandleInputExhausted() override
|
||||
{
|
||||
mDecoder->InputExhausted();
|
||||
mDecoder->ReturnDecodedData();
|
||||
}
|
||||
|
||||
void HandleOutput(Sample::Param aSample) override
|
||||
@ -180,6 +182,8 @@ public:
|
||||
}
|
||||
|
||||
if (size > 0) {
|
||||
MutexAutoLock lock(mDecoder->mMutex);
|
||||
|
||||
RefPtr<layers::Image> img = new SurfaceTextureImage(
|
||||
mDecoder->mSurfaceTexture.get(), mDecoder->mConfig.mDisplay,
|
||||
gl::OriginPos::BottomLeft);
|
||||
@ -219,6 +223,7 @@ public:
|
||||
: RemoteDataDecoder(MediaData::Type::VIDEO_DATA, aConfig.mMimeType,
|
||||
aFormat, aDrmStubId, aTaskQueue)
|
||||
, mImageContainer(aImageContainer)
|
||||
, mMutex("RemoteVideoDecoder Mutex")
|
||||
, mConfig(aConfig)
|
||||
{
|
||||
}
|
||||
@ -267,7 +272,7 @@ public:
|
||||
|
||||
RefPtr<MediaDataDecoder::DecodePromise> Decode(MediaRawData* aSample) override
|
||||
{
|
||||
mInputDurations.Insert(aSample->mDuration, aSample->mTime);
|
||||
mInputDurations.Insert(aSample->mTime, aSample->mDuration);
|
||||
return RemoteDataDecoder::Decode(aSample);
|
||||
}
|
||||
|
||||
@ -275,13 +280,20 @@ public:
|
||||
{
|
||||
return mIsCodecSupportAdaptivePlayback;
|
||||
}
|
||||
void ConfigurationChanged(const TrackInfo& aConfig) override
|
||||
{
|
||||
MOZ_ASSERT(aConfig.GetAsVideoInfo());
|
||||
MutexAutoLock lock(mMutex);
|
||||
mConfig = *aConfig.GetAsVideoInfo();
|
||||
}
|
||||
|
||||
private:
|
||||
layers::ImageContainer* mImageContainer;
|
||||
const VideoInfo mConfig;
|
||||
RefPtr<AndroidSurfaceTexture> mSurfaceTexture;
|
||||
DurationMap mInputDurations;
|
||||
bool mIsCodecSupportAdaptivePlayback = false;
|
||||
Mutex mMutex; // Protects mConfig
|
||||
VideoInfo mConfig;
|
||||
};
|
||||
|
||||
class RemoteAudioDecoder : public RemoteDataDecoder
|
||||
@ -303,7 +315,7 @@ public:
|
||||
if (!formatHasCSD && aConfig.mCodecSpecificConfig->Length() >= 2) {
|
||||
jni::ByteBuffer::LocalRef buffer(env);
|
||||
buffer = jni::ByteBuffer::New(aConfig.mCodecSpecificConfig->Elements(),
|
||||
aConfig.mCodecSpecificConfig->Length());
|
||||
aConfig.mCodecSpecificConfig->Length());
|
||||
NS_ENSURE_SUCCESS_VOID(
|
||||
aFormat->SetByteBuffer(NS_LITERAL_STRING("csd-0"), buffer));
|
||||
}
|
||||
@ -336,7 +348,7 @@ private:
|
||||
|
||||
void HandleInputExhausted() override
|
||||
{
|
||||
mDecoder->InputExhausted();
|
||||
mDecoder->ReturnDecodedData();
|
||||
}
|
||||
|
||||
void HandleOutput(Sample::Param aSample) override
|
||||
@ -471,8 +483,10 @@ RemoteDataDecoder::Flush()
|
||||
{
|
||||
RefPtr<RemoteDataDecoder> self = this;
|
||||
return InvokeAsync(mTaskQueue, __func__, [self, this]() {
|
||||
mDecodedData.Clear();
|
||||
mDecodePromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
mDrainPromise.RejectIfExists(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
mDrainStatus = DrainStatus::DRAINED;
|
||||
mJavaDecoder->Flush();
|
||||
return FlushPromise::CreateAndResolve(true, __func__);
|
||||
});
|
||||
@ -483,14 +497,26 @@ RemoteDataDecoder::Drain()
|
||||
{
|
||||
RefPtr<RemoteDataDecoder> self = this;
|
||||
return InvokeAsync(mTaskQueue, __func__, [self, this]() {
|
||||
RefPtr<DecodePromise> p = mDrainPromise.Ensure(__func__);
|
||||
if (mDrainStatus == DrainStatus::DRAINED) {
|
||||
// There's no operation to perform other than returning any already
|
||||
// decoded data.
|
||||
ReturnDecodedData();
|
||||
return p;
|
||||
}
|
||||
|
||||
if (mDrainStatus == DrainStatus::DRAINING) {
|
||||
// Draining operation already pending, let it complete its course.
|
||||
return p;
|
||||
}
|
||||
|
||||
BufferInfo::LocalRef bufferInfo;
|
||||
nsresult rv = BufferInfo::New(&bufferInfo);
|
||||
if (NS_FAILED(rv)) {
|
||||
return DecodePromise::CreateAndReject(NS_ERROR_OUT_OF_MEMORY, __func__);
|
||||
}
|
||||
mDrainStatus = DrainStatus::DRAINING;
|
||||
bufferInfo->Set(0, 0, -1, MediaCodec::BUFFER_FLAG_END_OF_STREAM);
|
||||
|
||||
RefPtr<DecodePromise> p = mDrainPromise.Ensure(__func__);
|
||||
mJavaDecoder->Input(nullptr, bufferInfo, nullptr);
|
||||
return p;
|
||||
});
|
||||
@ -544,6 +570,7 @@ RemoteDataDecoder::Decode(MediaRawData* aSample)
|
||||
}
|
||||
bufferInfo->Set(0, sample->Size(), sample->mTime, 0);
|
||||
|
||||
mDrainStatus = DrainStatus::DRAINABLE;
|
||||
RefPtr<DecodePromise> p = mDecodePromise.Ensure(__func__);
|
||||
mJavaDecoder->Input(bytes, bufferInfo, GetCryptoInfoFromSample(sample));
|
||||
return p;
|
||||
@ -563,22 +590,29 @@ RemoteDataDecoder::Output(MediaData* aSample)
|
||||
return;
|
||||
}
|
||||
mDecodedData.AppendElement(aSample);
|
||||
ReturnDecodedData();
|
||||
}
|
||||
|
||||
void
|
||||
RemoteDataDecoder::InputExhausted()
|
||||
RemoteDataDecoder::ReturnDecodedData()
|
||||
{
|
||||
if (!mTaskQueue->IsCurrentThreadIn()) {
|
||||
mTaskQueue->Dispatch(
|
||||
NewRunnableMethod(this, &RemoteDataDecoder::InputExhausted));
|
||||
NewRunnableMethod(this, &RemoteDataDecoder::ReturnDecodedData));
|
||||
return;
|
||||
}
|
||||
AssertOnTaskQueue();
|
||||
if (mShutdown) {
|
||||
return;
|
||||
}
|
||||
mDecodePromise.ResolveIfExists(mDecodedData, __func__);
|
||||
mDecodedData.Clear();
|
||||
// We only want to clear mDecodedData when we have resolved the promises.
|
||||
if (!mDecodePromise.IsEmpty()) {
|
||||
mDecodePromise.Resolve(mDecodedData, __func__);
|
||||
mDecodedData.Clear();
|
||||
} else if (!mDrainPromise.IsEmpty()) {
|
||||
mDrainPromise.Resolve(mDecodedData, __func__);
|
||||
mDecodedData.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -593,8 +627,8 @@ RemoteDataDecoder::DrainComplete()
|
||||
if (mShutdown) {
|
||||
return;
|
||||
}
|
||||
mDrainPromise.ResolveIfExists(mDecodedData, __func__);
|
||||
mDecodedData.Clear();
|
||||
mDrainStatus = DrainStatus::DRAINED;
|
||||
ReturnDecodedData();
|
||||
}
|
||||
|
||||
void
|
||||
@ -611,7 +645,6 @@ RemoteDataDecoder::Error(const MediaResult& aError)
|
||||
}
|
||||
mDecodePromise.RejectIfExists(aError, __func__);
|
||||
mDrainPromise.RejectIfExists(aError, __func__);
|
||||
mDecodedData.Clear();
|
||||
}
|
||||
|
||||
} // mozilla
|
||||
|
@ -48,7 +48,7 @@ protected:
|
||||
// Methods only called on mTaskQueue.
|
||||
RefPtr<ShutdownPromise> ProcessShutdown();
|
||||
void Output(MediaData* aSample);
|
||||
void InputExhausted();
|
||||
void ReturnDecodedData();
|
||||
void DrainComplete();
|
||||
void Error(const MediaResult& aError);
|
||||
void AssertOnTaskQueue()
|
||||
@ -70,6 +70,13 @@ protected:
|
||||
bool mShutdown = false;
|
||||
MozPromiseHolder<DecodePromise> mDecodePromise;
|
||||
MozPromiseHolder<DecodePromise> mDrainPromise;
|
||||
enum class DrainStatus
|
||||
{
|
||||
DRAINED,
|
||||
DRAINABLE,
|
||||
DRAINING,
|
||||
};
|
||||
DrainStatus mDrainStatus = DrainStatus::DRAINED;
|
||||
DecodedData mDecodedData;
|
||||
};
|
||||
|
||||
|
@ -19,6 +19,7 @@ namespace mozilla
|
||||
H264Converter::H264Converter(PlatformDecoderModule* aPDM,
|
||||
const CreateDecoderParams& aParams)
|
||||
: mPDM(aPDM)
|
||||
, mOriginalConfig(aParams.VideoConfig())
|
||||
, mCurrentConfig(aParams.VideoConfig())
|
||||
, mKnowsCompositor(aParams.mKnowsCompositor)
|
||||
, mImageContainer(aParams.mImageContainer)
|
||||
@ -53,8 +54,8 @@ H264Converter::Init()
|
||||
RefPtr<MediaDataDecoder::DecodePromise>
|
||||
H264Converter::Decode(MediaRawData* aSample)
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(!mDecodePromiseRequest.Exists() &&
|
||||
!mInitPromiseRequest.Exists(),
|
||||
MOZ_RELEASE_ASSERT(!mDecodePromiseRequest.Exists()
|
||||
&& !mInitPromiseRequest.Exists(),
|
||||
"Can't request a new decode until previous one completed");
|
||||
|
||||
if (!mp4_demuxer::AnnexB::ConvertSampleToAVCC(aSample)) {
|
||||
@ -97,8 +98,8 @@ H264Converter::Decode(MediaRawData* aSample)
|
||||
return DecodePromise::CreateAndResolve(DecodedData(), __func__);
|
||||
}
|
||||
|
||||
if (!mNeedAVCC &&
|
||||
!mp4_demuxer::AnnexB::ConvertSampleToAnnexB(aSample, mNeedKeyframe)) {
|
||||
if (!mNeedAVCC
|
||||
&& !mp4_demuxer::AnnexB::ConvertSampleToAnnexB(aSample, mNeedKeyframe)) {
|
||||
return DecodePromise::CreateAndReject(
|
||||
MediaResult(NS_ERROR_OUT_OF_MEMORY,
|
||||
RESULT_DETAIL("ConvertSampleToAnnexB")),
|
||||
@ -135,9 +136,17 @@ H264Converter::Drain()
|
||||
RefPtr<ShutdownPromise>
|
||||
H264Converter::Shutdown()
|
||||
{
|
||||
mInitPromiseRequest.DisconnectIfExists();
|
||||
mDecodePromiseRequest.DisconnectIfExists();
|
||||
mFlushRequest.DisconnectIfExists();
|
||||
mShutdownRequest.DisconnectIfExists();
|
||||
mPendingSample = nullptr;
|
||||
if (mShutdownPromise) {
|
||||
// We have a shutdown in progress, return that promise instead as we can't
|
||||
// shutdown a decoder twice.
|
||||
return mShutdownPromise.forget();
|
||||
}
|
||||
if (mDecoder) {
|
||||
mInitPromiseRequest.DisconnectIfExists();
|
||||
mDecodePromiseRequest.DisconnectIfExists();
|
||||
RefPtr<MediaDataDecoder> decoder = mDecoder.forget();
|
||||
return decoder->Shutdown();
|
||||
}
|
||||
@ -176,8 +185,8 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
|
||||
if (mp4_demuxer::H264::DecodeSPSFromExtraData(mCurrentConfig.mExtraData, spsdata)) {
|
||||
// Do some format check here.
|
||||
// WMF H.264 Video Decoder and Apple ATDecoder do not support YUV444 format.
|
||||
if (spsdata.profile_idc == 244 /* Hi444PP */ ||
|
||||
spsdata.chroma_format_idc == PDMFactory::kYUV444) {
|
||||
if (spsdata.profile_idc == 244 /* Hi444PP */
|
||||
|| spsdata.chroma_format_idc == PDMFactory::kYUV444) {
|
||||
mLastError = NS_ERROR_FAILURE;
|
||||
if (aDiagnostics) {
|
||||
aDiagnostics->SetVideoNotSupported();
|
||||
@ -191,7 +200,7 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
|
||||
}
|
||||
|
||||
mDecoder = mPDM->CreateVideoDecoder({
|
||||
mCurrentConfig,
|
||||
mUseOriginalConfig ? mOriginalConfig : mCurrentConfig,
|
||||
mTaskQueue,
|
||||
aDiagnostics,
|
||||
mImageContainer,
|
||||
@ -206,6 +215,7 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mUseOriginalConfig = false;
|
||||
mNeedKeyframe = true;
|
||||
|
||||
return NS_OK;
|
||||
@ -242,73 +252,137 @@ H264Converter::OnDecoderInitDone(const TrackType aTrackType)
|
||||
{
|
||||
mInitPromiseRequest.Complete();
|
||||
RefPtr<MediaRawData> sample = mPendingSample.forget();
|
||||
if (mNeedKeyframe && !sample->mKeyframe) {
|
||||
mDecodePromise.ResolveIfExists(DecodedData(), __func__);
|
||||
}
|
||||
mNeedKeyframe = false;
|
||||
if (!mNeedAVCC &&
|
||||
!mp4_demuxer::AnnexB::ConvertSampleToAnnexB(sample, mNeedKeyframe)) {
|
||||
mDecodePromise.RejectIfExists(
|
||||
MediaResult(NS_ERROR_OUT_OF_MEMORY,
|
||||
RESULT_DETAIL("ConvertSampleToAnnexB")),
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
RefPtr<H264Converter> self = this;
|
||||
mDecoder->Decode(sample)
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__,
|
||||
[self, this](const MediaDataDecoder::DecodedData& aResults) {
|
||||
mDecodePromiseRequest.Complete();
|
||||
mDecodePromise.ResolveIfExists(aResults, __func__);
|
||||
},
|
||||
[self, this](const MediaResult& aError) {
|
||||
mDecodePromiseRequest.Complete();
|
||||
mDecodePromise.RejectIfExists(aError, __func__);
|
||||
})
|
||||
->Track(mDecodePromiseRequest);
|
||||
DecodeFirstSample(sample);
|
||||
}
|
||||
|
||||
void
|
||||
H264Converter::OnDecoderInitFailed(const MediaResult& aError)
|
||||
{
|
||||
mInitPromiseRequest.Complete();
|
||||
mDecodePromise.RejectIfExists(
|
||||
mDecodePromise.Reject(
|
||||
MediaResult(NS_ERROR_DOM_MEDIA_FATAL_ERR,
|
||||
RESULT_DETAIL("Unable to initialize H264 decoder")),
|
||||
__func__);
|
||||
}
|
||||
|
||||
void
|
||||
H264Converter::DecodeFirstSample(MediaRawData* aSample)
|
||||
{
|
||||
if (mNeedKeyframe && !aSample->mKeyframe) {
|
||||
mDecodePromise.Resolve(DecodedData(), __func__);
|
||||
return;
|
||||
}
|
||||
mNeedKeyframe = false;
|
||||
if (!mNeedAVCC
|
||||
&& !mp4_demuxer::AnnexB::ConvertSampleToAnnexB(aSample, mNeedKeyframe)) {
|
||||
mDecodePromise.Reject(
|
||||
MediaResult(NS_ERROR_OUT_OF_MEMORY,
|
||||
RESULT_DETAIL("ConvertSampleToAnnexB")),
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
if (CanRecycleDecoder()) {
|
||||
mDecoder->ConfigurationChanged(mCurrentConfig);
|
||||
}
|
||||
RefPtr<H264Converter> self = this;
|
||||
mDecoder->Decode(aSample)
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__,
|
||||
[self, this](const MediaDataDecoder::DecodedData& aResults) {
|
||||
mDecodePromiseRequest.Complete();
|
||||
mDecodePromise.Resolve(aResults, __func__);
|
||||
},
|
||||
[self, this](const MediaResult& aError) {
|
||||
mDecodePromiseRequest.Complete();
|
||||
mDecodePromise.Reject(aError, __func__);
|
||||
})
|
||||
->Track(mDecodePromiseRequest);
|
||||
}
|
||||
|
||||
nsresult
|
||||
H264Converter::CheckForSPSChange(MediaRawData* aSample)
|
||||
{
|
||||
RefPtr<MediaByteBuffer> extra_data =
|
||||
mp4_demuxer::AnnexB::ExtractExtraData(aSample);
|
||||
if (!mp4_demuxer::AnnexB::HasSPS(extra_data) ||
|
||||
mp4_demuxer::AnnexB::CompareExtraData(extra_data,
|
||||
mCurrentConfig.mExtraData)) {
|
||||
if (!mp4_demuxer::AnnexB::HasSPS(extra_data)
|
||||
|| mp4_demuxer::AnnexB::CompareExtraData(extra_data,
|
||||
mCurrentConfig.mExtraData)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (MediaPrefs::MediaDecoderCheckRecycling() &&
|
||||
mDecoder->SupportDecoderRecycling()) {
|
||||
mPendingSample = aSample;
|
||||
|
||||
if (CanRecycleDecoder()) {
|
||||
// Do not recreate the decoder, reuse it.
|
||||
UpdateConfigFromExtraData(extra_data);
|
||||
// Ideally we would want to drain the decoder instead of flushing it.
|
||||
// However the draining operation requires calling Drain and looping several
|
||||
// times which isn't possible from within the H264Converter. So instead we
|
||||
// flush the decoder. In practice, this is a no-op as SPS change will only
|
||||
// be used with MSE. And with MSE, the MediaFormatReader would have drained
|
||||
// the decoder already.
|
||||
RefPtr<H264Converter> self = this;
|
||||
mDecoder->Flush()
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(),
|
||||
__func__,
|
||||
[self, this]() {
|
||||
mFlushRequest.Complete();
|
||||
DecodeFirstSample(mPendingSample);
|
||||
mPendingSample = nullptr;
|
||||
},
|
||||
[self, this](const MediaResult& aError) {
|
||||
mFlushRequest.Complete();
|
||||
mDecodePromise.Reject(aError, __func__);
|
||||
})
|
||||
->Track(mFlushRequest);
|
||||
mNeedKeyframe = true;
|
||||
return NS_OK;
|
||||
// This is not really initializing the decoder, but it will do as it
|
||||
// indicates an operation is pending.
|
||||
return NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER;
|
||||
}
|
||||
|
||||
// The SPS has changed, signal to flush the current decoder and create a
|
||||
// new one.
|
||||
mDecoder->Flush();
|
||||
Shutdown();
|
||||
return CreateDecoderAndInit(aSample);
|
||||
RefPtr<H264Converter> self = this;
|
||||
mDecoder->Flush()
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(),
|
||||
__func__,
|
||||
[self, this]() {
|
||||
mFlushRequest.Complete();
|
||||
mShutdownPromise = Shutdown();
|
||||
mShutdownPromise
|
||||
->Then(AbstractThread::GetCurrent()->AsTaskQueue(),
|
||||
__func__,
|
||||
[self, this]() {
|
||||
mShutdownRequest.Complete();
|
||||
mShutdownPromise = nullptr;
|
||||
RefPtr<MediaRawData> sample = mPendingSample.forget();
|
||||
nsresult rv = CreateDecoderAndInit(sample);
|
||||
if (rv == NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER) {
|
||||
// All good so far, will continue later.
|
||||
return;
|
||||
}
|
||||
MOZ_ASSERT(NS_FAILED(rv));
|
||||
mDecodePromise.Reject(rv, __func__);
|
||||
return;
|
||||
},
|
||||
[] { MOZ_CRASH("Can't reach here'"); })
|
||||
->Track(mShutdownRequest);
|
||||
},
|
||||
[self, this](const MediaResult& aError) {
|
||||
mFlushRequest.Complete();
|
||||
mDecodePromise.Reject(aError, __func__);
|
||||
})
|
||||
->Track(mFlushRequest);
|
||||
return NS_ERROR_DOM_MEDIA_INITIALIZING_DECODER;
|
||||
}
|
||||
|
||||
void
|
||||
H264Converter::UpdateConfigFromExtraData(MediaByteBuffer* aExtraData)
|
||||
{
|
||||
mp4_demuxer::SPSData spsdata;
|
||||
if (mp4_demuxer::H264::DecodeSPSFromExtraData(aExtraData, spsdata) &&
|
||||
spsdata.pic_width > 0 && spsdata.pic_height > 0) {
|
||||
if (mp4_demuxer::H264::DecodeSPSFromExtraData(aExtraData, spsdata)
|
||||
&& spsdata.pic_width > 0
|
||||
&& spsdata.pic_height > 0) {
|
||||
mp4_demuxer::H264::EnsureSPSIsSane(spsdata);
|
||||
mCurrentConfig.mImage.width = spsdata.pic_width;
|
||||
mCurrentConfig.mImage.height = spsdata.pic_height;
|
||||
|
@ -47,7 +47,12 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ConfigurationChanged(const TrackInfo& aConfig) override
|
||||
{
|
||||
if (mDecoder && mDecoder->SupportDecoderRecycling()) {
|
||||
mDecoder->ConfigurationChanged(aConfig);
|
||||
}
|
||||
}
|
||||
nsresult GetLastError() const { return mLastError; }
|
||||
|
||||
private:
|
||||
@ -62,7 +67,17 @@ private:
|
||||
void OnDecoderInitDone(const TrackType aTrackType);
|
||||
void OnDecoderInitFailed(const MediaResult& aError);
|
||||
|
||||
bool CanRecycleDecoder() const
|
||||
{
|
||||
MOZ_ASSERT(mDecoder);
|
||||
return MediaPrefs::MediaDecoderCheckRecycling()
|
||||
&& mDecoder->SupportDecoderRecycling();
|
||||
}
|
||||
|
||||
void DecodeFirstSample(MediaRawData* aSample);
|
||||
|
||||
RefPtr<PlatformDecoderModule> mPDM;
|
||||
const VideoInfo mOriginalConfig;
|
||||
VideoInfo mCurrentConfig;
|
||||
RefPtr<layers::KnowsCompositor> mKnowsCompositor;
|
||||
RefPtr<layers::ImageContainer> mImageContainer;
|
||||
@ -72,10 +87,16 @@ private:
|
||||
MozPromiseRequestHolder<InitPromise> mInitPromiseRequest;
|
||||
MozPromiseRequestHolder<DecodePromise> mDecodePromiseRequest;
|
||||
MozPromiseHolder<DecodePromise> mDecodePromise;
|
||||
MozPromiseRequestHolder<FlushPromise> mFlushRequest;
|
||||
MozPromiseRequestHolder<ShutdownPromise> mShutdownRequest;
|
||||
RefPtr<ShutdownPromise> mShutdownPromise;
|
||||
|
||||
RefPtr<GMPCrashHelper> mGMPCrashHelper;
|
||||
bool mNeedAVCC;
|
||||
nsresult mLastError;
|
||||
bool mNeedKeyframe = true;
|
||||
// Set to true once a decoder has been created.
|
||||
bool mUseOriginalConfig = true;
|
||||
const TrackInfo::TrackType mType;
|
||||
MediaEventProducer<TrackInfo::TrackType>* const mOnWaitingForKeyEvent;
|
||||
};
|
||||
|
@ -97,7 +97,7 @@ HTTP load media-element-source-seek-1.html
|
||||
load offline-buffer-source-ended-1.html
|
||||
load oscillator-ended-1.html
|
||||
load oscillator-ended-2.html
|
||||
load video-replay-after-audio-end.html
|
||||
skip-if(Android) load video-replay-after-audio-end.html # bug 1339449
|
||||
# This needs to run at the end to avoid leaking busted state into other tests.
|
||||
load 691096-1.html
|
||||
load 1236639.html
|
||||
|
@ -156,6 +156,7 @@ tags=capturestream
|
||||
skip-if = toolkit == 'android' # bug 1145816
|
||||
[test_mediaElementAudioSourceNodeVideo.html]
|
||||
tags=capturestream
|
||||
skip-if = toolkit == 'android' # bug 1339448
|
||||
[test_mediaElementAudioSourceNodeCrossOrigin.html]
|
||||
tags=capturestream
|
||||
skip-if = toolkit == 'android' # bug 1145816
|
||||
|
@ -689,7 +689,7 @@ WebMDemuxer::GetNextPacket(TrackInfo::TrackType aType,
|
||||
|| si.h != mLastSeenFrameHeight.value())) {
|
||||
mInfo.mVideo.mDisplay = nsIntSize(si.w, si.h);
|
||||
mSharedVideoTrackInfo =
|
||||
new SharedTrackInfo(mInfo.mVideo, ++sStreamSourceID);
|
||||
new TrackInfoSharedPtr(mInfo.mVideo, ++sStreamSourceID);
|
||||
}
|
||||
mLastSeenFrameWidth = Some(si.w);
|
||||
mLastSeenFrameHeight = Some(si.h);
|
||||
|
@ -258,7 +258,7 @@ private:
|
||||
Maybe<uint32_t> mLastSeenFrameHeight;
|
||||
// This will be populated only if a resolution change occurs, otherwise it
|
||||
// will be left as null so the original metadata is used
|
||||
RefPtr<SharedTrackInfo> mSharedVideoTrackInfo;
|
||||
RefPtr<TrackInfoSharedPtr> mSharedVideoTrackInfo;
|
||||
|
||||
EncryptionInfo mCrypto;
|
||||
};
|
||||
|
@ -436,6 +436,20 @@ partial interface Document {
|
||||
[Func="IsChromeOrXBL"] readonly attribute boolean inlineScriptAllowedByCSP;
|
||||
};
|
||||
|
||||
// For more information on Flash classification, see
|
||||
// toolkit/components/url-classifier/flash-block-lists.rst
|
||||
enum FlashClassification {
|
||||
"unclassified", // Denotes a classification that has not yet been computed.
|
||||
// Allows for lazy classification.
|
||||
"unknown", // Site is not on the whitelist or blacklist
|
||||
"allowed", // Site is on the Flash whitelist
|
||||
"denied" // Site is on the Flash blacklist
|
||||
};
|
||||
partial interface Document {
|
||||
[ChromeOnly]
|
||||
readonly attribute FlashClassification documentFlashClassification;
|
||||
};
|
||||
|
||||
Document implements XPathEvaluator;
|
||||
Document implements GlobalEventHandlers;
|
||||
Document implements DocumentAndElementEventHandlers;
|
||||
|
7
ipc/ipdl/test/ipdl/error/BadNestedManagee.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/BadNestedManagee.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol BadNestedManager;
|
||||
|
||||
nested(upto inside_sync) async protocol BadNestedManagee {
|
||||
manager BadNestedManager;
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/BadNestedManager.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/BadNestedManager.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol BadNestedManagee;
|
||||
|
||||
nested(upto not) async protocol BadNestedManager {
|
||||
manages BadNestedManagee;
|
||||
parent:
|
||||
async BadNestedManagee();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/IntrAsyncManagee.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/IntrAsyncManagee.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol IntrAsyncManager;
|
||||
|
||||
intr protocol IntrAsyncManagee {
|
||||
manager IntrAsyncManager;
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/IntrAsyncManager.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/IntrAsyncManager.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol IntrAsyncManagee;
|
||||
|
||||
async protocol IntrAsyncManager {
|
||||
manages IntrAsyncManagee;
|
||||
parent:
|
||||
async IntrAsyncManagee();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/IntrSyncManagee.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/IntrSyncManagee.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol IntrSyncManager;
|
||||
|
||||
intr protocol IntrSyncManagee {
|
||||
manager IntrSyncManager;
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/IntrSyncManager.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/IntrSyncManager.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol IntrSyncManagee;
|
||||
|
||||
sync protocol IntrSyncManager {
|
||||
manages IntrSyncManagee;
|
||||
parent:
|
||||
async IntrSyncManagee();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/SyncAsyncManagee.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/SyncAsyncManagee.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol SyncAsyncManager;
|
||||
|
||||
sync protocol SyncAsyncManagee {
|
||||
manager SyncAsyncManager;
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
7
ipc/ipdl/test/ipdl/error/SyncAsyncManager.ipdl
Normal file
7
ipc/ipdl/test/ipdl/error/SyncAsyncManager.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol SyncAsyncManagee;
|
||||
|
||||
async protocol SyncAsyncManager {
|
||||
manages SyncAsyncManagee;
|
||||
parent:
|
||||
async SyncAsyncManagee();
|
||||
};
|
10
ipc/ipdl/test/ipdl/error/redeclScope.ipdlh
Normal file
10
ipc/ipdl/test/ipdl/error/redeclScope.ipdlh
Normal file
@ -0,0 +1,10 @@
|
||||
struct Foo {
|
||||
bool b;
|
||||
};
|
||||
|
||||
struct Bar {
|
||||
// This should produce an error saying that Foo is a redeclaration,
|
||||
// even though the initial declaration was in a different frame of
|
||||
// the symbol table.
|
||||
bool Foo;
|
||||
};
|
18
ipc/ipdl/test/ipdl/ok/EndpointDecl.ipdl
Normal file
18
ipc/ipdl/test/ipdl/ok/EndpointDecl.ipdl
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
// Basic test that Endpoint types are declared for protocols, within
|
||||
// that protocol.
|
||||
|
||||
struct Whatever {
|
||||
Endpoint<EndpointDeclParent> par;
|
||||
Endpoint<EndpointDeclChild> chi;
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
protocol EndpointDecl {
|
||||
child:
|
||||
async Message(Endpoint<EndpointDeclParent> aEndpointParent,
|
||||
Endpoint<EndpointDeclChild> aEndpointChild);
|
||||
};
|
||||
|
||||
}
|
9
ipc/ipdl/test/ipdl/ok/EndpointUse.ipdl
Normal file
9
ipc/ipdl/test/ipdl/ok/EndpointUse.ipdl
Normal file
@ -0,0 +1,9 @@
|
||||
include protocol EndpointDecl;
|
||||
|
||||
// Basic test that Endpoint types are declared for included protocols.
|
||||
|
||||
protocol EndpointUse {
|
||||
child:
|
||||
async Message(Endpoint<EndpointDeclParent> aEndpointParent,
|
||||
Endpoint<EndpointDeclChild> aEndpointChild);
|
||||
};
|
7
ipc/ipdl/test/ipdl/ok/SyncSyncManagee.ipdl
Normal file
7
ipc/ipdl/test/ipdl/ok/SyncSyncManagee.ipdl
Normal file
@ -0,0 +1,7 @@
|
||||
include protocol SyncSyncManager;
|
||||
|
||||
sync protocol SyncSyncManagee {
|
||||
manager SyncSyncManager;
|
||||
child:
|
||||
async __delete__();
|
||||
};
|
11
ipc/ipdl/test/ipdl/ok/SyncSyncManager.ipdl
Normal file
11
ipc/ipdl/test/ipdl/ok/SyncSyncManager.ipdl
Normal file
@ -0,0 +1,11 @@
|
||||
include protocol SyncSyncManagee;
|
||||
|
||||
/* The main reason for this test is that it would have caught a bug
|
||||
* in the Rust IPDL parser that was treating "sync" like "async" in the
|
||||
* nested case.
|
||||
*/
|
||||
nested(upto not) sync protocol SyncSyncManager {
|
||||
manages SyncSyncManagee;
|
||||
parent:
|
||||
async SyncSyncManagee();
|
||||
};
|
8
layout/reftests/svg/comments-in-pres-attrs.svg
Normal file
8
layout/reftests/svg/comments-in-pres-attrs.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
<title>Test for whether comments are allowed in SVG presentation attributes</title>
|
||||
<rect width="100%" height="100%" fill="/* comment */lime/* also comment */"/>
|
||||
</svg>
|
After Width: | Height: | Size: 346 B |
@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Reference that css comment in attribute is not allowed</title>
|
||||
<rect width="100%" height="100%" fill="black"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 170 B |
@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<title>Testcase that css comment in attribute is not allowed</title>
|
||||
<rect width="100%" height="100%" fill="/* blah */ red"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 178 B |
@ -27,7 +27,6 @@ include svg-integration/reftest.list
|
||||
|
||||
== baseline-middle-01.svg pass.svg
|
||||
== border-radius-01.html pass.svg
|
||||
== cssComment-in-attribute-01.svg cssComment-in-attribute-01-ref.svg
|
||||
== clip-01.svg pass.svg
|
||||
== clip-02a.svg clip-02-ref.svg
|
||||
== clip-02b.svg clip-02-ref.svg
|
||||
@ -43,6 +42,7 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||/^Windows\x20NT\x206\.[12]/
|
||||
== clipPath-basic-07.svg pass.svg
|
||||
== clipPath-winding-01.svg pass.svg
|
||||
== clip-surface-clone-01.svg clip-surface-clone-01-ref.svg
|
||||
== comments-in-pres-attrs.svg pass.svg
|
||||
== conditions-01.svg pass.svg
|
||||
== conditions-02.svg pass.svg
|
||||
== conditions-03.svg pass.svg
|
||||
|
@ -596,11 +596,6 @@ protected:
|
||||
nsAutoSuppressErrors mErrorSuppresser;
|
||||
};
|
||||
|
||||
|
||||
bool IsSVGMode() const {
|
||||
return mScanner->IsSVGMode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the current input state, which includes any currently pushed
|
||||
* back token, and the current position of the scanner.
|
||||
@ -1464,6 +1459,10 @@ protected:
|
||||
// True if we are in parsing rules for the chrome.
|
||||
bool mIsChrome : 1;
|
||||
|
||||
// True if we're parsing SVG presentation attributes
|
||||
// These attributes allow non-calc lengths to be unitless (mapping to px)
|
||||
bool mIsSVGMode : 1;
|
||||
|
||||
// True if viewport units should be allowed.
|
||||
bool mViewportUnitsEnabled : 1;
|
||||
|
||||
@ -1586,6 +1585,7 @@ CSSParserImpl::CSSParserImpl()
|
||||
mUnitlessLengthQuirk(false),
|
||||
mParsingMode(css::eAuthorSheetFeatures),
|
||||
mIsChrome(false),
|
||||
mIsSVGMode(false),
|
||||
mViewportUnitsEnabled(true),
|
||||
mParsingCompoundProperty(false),
|
||||
mInSupportsCondition(false),
|
||||
@ -1677,6 +1677,7 @@ void
|
||||
CSSParserImpl::ReleaseScanner()
|
||||
{
|
||||
mScanner = nullptr;
|
||||
mIsSVGMode = false;
|
||||
mReporter = nullptr;
|
||||
mBaseURI = nullptr;
|
||||
mSheetURI = nullptr;
|
||||
@ -1991,7 +1992,6 @@ CSSParserImpl::ParseProperty(const nsCSSPropertyID aPropID,
|
||||
css::ErrorReporter reporter(scanner, mSheet, mChildLoader, aSheetURI);
|
||||
InitScanner(scanner, reporter, aSheetURI, aBaseURI, aSheetPrincipal);
|
||||
mSection = eCSSSection_General;
|
||||
scanner.SetSVGMode(aIsSVGMode);
|
||||
|
||||
*aChanged = false;
|
||||
|
||||
@ -2006,6 +2006,7 @@ CSSParserImpl::ParseProperty(const nsCSSPropertyID aPropID,
|
||||
return;
|
||||
}
|
||||
|
||||
mIsSVGMode = aIsSVGMode;
|
||||
bool parsedOK = ParseProperty(aPropID);
|
||||
// We should now be at EOF
|
||||
if (parsedOK && GetToken(true)) {
|
||||
@ -2041,6 +2042,7 @@ CSSParserImpl::ParseProperty(const nsCSSPropertyID aPropID,
|
||||
}
|
||||
|
||||
mTempData.AssertInitialState();
|
||||
mIsSVGMode = false;
|
||||
|
||||
ReleaseScanner();
|
||||
}
|
||||
@ -7791,7 +7793,7 @@ CSSParserImpl::ParseVariant(nsCSSValue& aValue,
|
||||
}
|
||||
}
|
||||
|
||||
if (IsSVGMode() && !IsParsingCompoundProperty()) {
|
||||
if (mIsSVGMode && !IsParsingCompoundProperty()) {
|
||||
// STANDARD: SVG Spec states that lengths and coordinates can be unitless
|
||||
// in which case they default to user-units (1 px = 1 user unit)
|
||||
if (((aVariantMask & VARIANT_LENGTH) != 0) &&
|
||||
@ -17773,7 +17775,6 @@ CSSParserImpl::IsValueValidForProperty(const nsCSSPropertyID aPropID,
|
||||
nsAutoSuppressErrors suppressErrors(this);
|
||||
|
||||
mSection = eCSSSection_General;
|
||||
scanner.SetSVGMode(false);
|
||||
|
||||
// Check for unknown properties
|
||||
if (eCSSProperty_UNKNOWN == aPropID) {
|
||||
|
@ -352,7 +352,6 @@ nsCSSScanner::nsCSSScanner(const nsAString& aBuffer, uint32_t aLineNumber)
|
||||
, mRecordStartOffset(0)
|
||||
, mEOFCharacters(eEOFCharacters_None)
|
||||
, mReporter(nullptr)
|
||||
, mSVGMode(false)
|
||||
, mRecording(false)
|
||||
, mSeenBadToken(false)
|
||||
, mSeenVariableReference(false)
|
||||
@ -1233,7 +1232,7 @@ nsCSSScanner::Next(nsCSSToken& aToken, nsCSSScannerExclude aSkip)
|
||||
}
|
||||
continue; // start again at the beginning
|
||||
}
|
||||
if (ch == '/' && !IsSVGMode() && Peek(1) == '*') {
|
||||
if (ch == '/' && Peek(1) == '*') {
|
||||
SkipComment();
|
||||
if (aSkip == eCSSScannerExclude_None) {
|
||||
aToken.mType = eCSSToken_Comment;
|
||||
|
@ -208,13 +208,6 @@ class nsCSSScanner {
|
||||
void SetErrorReporter(mozilla::css::ErrorReporter* aReporter) {
|
||||
mReporter = aReporter;
|
||||
}
|
||||
// Set whether or not we are processing SVG
|
||||
void SetSVGMode(bool aSVGMode) {
|
||||
mSVGMode = aSVGMode;
|
||||
}
|
||||
bool IsSVGMode() const {
|
||||
return mSVGMode;
|
||||
}
|
||||
|
||||
// Reset or check whether a BAD_URL or BAD_STRING token has been seen.
|
||||
void ClearSeenBadToken() { mSeenBadToken = false; }
|
||||
@ -365,8 +358,6 @@ protected:
|
||||
|
||||
mozilla::css::ErrorReporter *mReporter;
|
||||
|
||||
// True if we are in SVG mode; false in "normal" CSS
|
||||
bool mSVGMode;
|
||||
bool mRecording;
|
||||
bool mSeenBadToken;
|
||||
bool mSeenVariableReference;
|
||||
|
@ -621,7 +621,7 @@ pref("media.decoder.recycle.enabled", true);
|
||||
pref("media.android-media-codec.enabled", true);
|
||||
pref("media.android-media-codec.preferred", true);
|
||||
// Run decoder in seperate process.
|
||||
pref("media.android-remote-codec.enabled", false);
|
||||
pref("media.android-remote-codec.enabled", true);
|
||||
|
||||
// Enable MSE
|
||||
pref("media.mediasource.enabled", true);
|
||||
|
@ -1157,4 +1157,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
||||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1495465368089000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1495552270917000);
|
||||
|
@ -143,7 +143,6 @@ ahmedabadflowermall.com: did not receive HSTS header
|
||||
ahoynetwork.com: could not connect to host
|
||||
ahri.ovh: could not connect to host
|
||||
aidanwoods.com: did not receive HSTS header
|
||||
airbnb.com: did not receive HSTS header
|
||||
aircomms.com: did not receive HSTS header
|
||||
airproto.com: did not receive HSTS header
|
||||
aishnair.com: could not connect to host
|
||||
@ -172,8 +171,8 @@ alexandre.sh: did not receive HSTS header
|
||||
alexisabarca.com: did not receive HSTS header
|
||||
alexsergeyev.com: could not connect to host
|
||||
alfa24.pro: could not connect to host
|
||||
alisync.com: could not connect to host
|
||||
alittlebitcheeky.com: did not receive HSTS header
|
||||
aljaspod.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
alkami.com: did not receive HSTS header
|
||||
all-subtitles.com: did not receive HSTS header
|
||||
all.tf: did not receive HSTS header
|
||||
@ -342,7 +341,6 @@ authentication.io: could not connect to host
|
||||
authoritynutrition.com: did not receive HSTS header
|
||||
auto-serwis.zgorzelec.pl: did not receive HSTS header
|
||||
auto4trade.nl: could not connect to host
|
||||
autoepc.ro: did not receive HSTS header
|
||||
autojuhos.sk: could not connect to host
|
||||
autokovrik-diskont.ru: did not receive HSTS header
|
||||
autotsum.com: could not connect to host
|
||||
@ -360,11 +358,9 @@ awg-mode.de: did not receive HSTS header
|
||||
axado.com.br: did not receive HSTS header
|
||||
axeny.com: did not receive HSTS header
|
||||
az.search.yahoo.com: did not receive HSTS header
|
||||
azimut.fr: could not connect to host
|
||||
azprep.us: could not connect to host
|
||||
azuxul.fr: could not connect to host
|
||||
b3orion.com: max-age too low: 0
|
||||
babelfisch.eu: could not connect to host
|
||||
baby-click.de: could not connect to host
|
||||
babybic.hu: did not receive HSTS header
|
||||
babyhouse.xyz: could not connect to host
|
||||
@ -374,6 +370,7 @@ back-bone.nl: did not receive HSTS header
|
||||
bacon-monitoring.org: could not connect to host
|
||||
badcronjob.com: could not connect to host
|
||||
badkamergigant.com: could not connect to host
|
||||
badlink.org: could not connect to host
|
||||
baff.lu: did not receive HSTS header
|
||||
baiduaccount.com: could not connect to host
|
||||
baiyangliu.com: could not connect to host
|
||||
@ -391,7 +388,6 @@ basicsolutionsus.com: did not receive HSTS header
|
||||
basilisk.io: could not connect to host
|
||||
basnieuwenhuizen.nl: could not connect to host
|
||||
bassh.net: could not connect to host
|
||||
batonger.com: could not connect to host
|
||||
baud.ninja: could not connect to host
|
||||
baumstark.ca: could not connect to host
|
||||
baysse.eu: could not connect to host
|
||||
@ -415,7 +411,7 @@ bebesurdoue.com: could not connect to host
|
||||
bedabox.com: max-age too low: 0
|
||||
bedeta.de: could not connect to host
|
||||
bedreid.dk: did not receive HSTS header
|
||||
bedrijvenadministratie.nl: did not receive HSTS header
|
||||
bedrijvenadministratie.nl: could not connect to host
|
||||
beholdthehurricane.com: could not connect to host
|
||||
beier.io: did not receive HSTS header
|
||||
belairsewvac.com: could not connect to host
|
||||
@ -480,6 +476,7 @@ bitheus.com: could not connect to host
|
||||
bithosting.io: did not receive HSTS header
|
||||
bitnet.io: did not receive HSTS header
|
||||
bitsafe.systems: did not receive HSTS header
|
||||
bitshaker.net: could not connect to host
|
||||
bitvigor.com: could not connect to host
|
||||
bityes.org: could not connect to host
|
||||
bivsi.com: could not connect to host
|
||||
@ -537,7 +534,6 @@ bootjp.me: did not receive HSTS header
|
||||
boringsecurity.net: could not connect to host
|
||||
boris.one: did not receive HSTS header
|
||||
borisbesemer.com: could not connect to host
|
||||
bosun.io: could not connect to host
|
||||
botox.bz: did not receive HSTS header
|
||||
bouwbedrijfpurmerend.nl: did not receive HSTS header
|
||||
bowlroll.net: max-age too low: 0
|
||||
@ -621,7 +617,6 @@ cake.care: could not connect to host
|
||||
calendarr.com: did not receive HSTS header
|
||||
calgaryconstructionjobs.com: did not receive HSTS header
|
||||
calix.com: max-age too low: 0
|
||||
call.me: did not receive HSTS header
|
||||
calltrackingreports.com: could not connect to host
|
||||
calvin.me: max-age too low: 2592000
|
||||
calvinallen.net: did not receive HSTS header
|
||||
@ -632,6 +627,7 @@ cancelmyprofile.com: did not receive HSTS header
|
||||
candicontrols.com: did not receive HSTS header
|
||||
candratech.com: could not connect to host
|
||||
candylion.rocks: could not connect to host
|
||||
canfly.org: did not receive HSTS header
|
||||
cannyfoxx.me: could not connect to host
|
||||
canyonshoa.com: did not receive HSTS header
|
||||
capecycles.co.za: did not receive HSTS header
|
||||
@ -723,6 +719,7 @@ chloe.re: could not connect to host
|
||||
chm.vn: did not receive HSTS header
|
||||
chokladfantasi.net: could not connect to host
|
||||
chontalpa.pw: could not connect to host
|
||||
chopperforums.com: did not receive HSTS header
|
||||
chotu.net: could not connect to host
|
||||
chris-web.info: could not connect to host
|
||||
chrisandsarahinasia.com: did not receive HSTS header
|
||||
@ -758,9 +755,11 @@ clara-baumert.de: could not connect to host
|
||||
classicsandexotics.com: did not receive HSTS header
|
||||
classicspublishing.com: could not connect to host
|
||||
clcleaningco.com: could not connect to host
|
||||
cldly.com: could not connect to host
|
||||
cleaningsquad.ca: could not connect to host
|
||||
cleanmta.com: could not connect to host
|
||||
clearc.tk: could not connect to host
|
||||
clemovementlaw.com: could not connect to host
|
||||
clerkendweller.uk: could not connect to host
|
||||
clickandgo.com: did not receive HSTS header
|
||||
clickandshoot.nl: did not receive HSTS header
|
||||
@ -799,7 +798,6 @@ cmsbattle.com: could not connect to host
|
||||
cmscafe.ru: did not receive HSTS header
|
||||
cn.search.yahoo.com: did not receive HSTS header
|
||||
cni-certing.it: max-age too low: 0
|
||||
cnwage.com: could not connect to host
|
||||
co50.com: did not receive HSTS header
|
||||
cocaine-import.agency: could not connect to host
|
||||
cocktailfuture.fr: could not connect to host
|
||||
@ -811,7 +809,6 @@ codeco.pw: could not connect to host
|
||||
codeforce.io: could not connect to host
|
||||
codelayer.ca: could not connect to host
|
||||
codepoet.de: could not connect to host
|
||||
codepult.com: could not connect to host
|
||||
codepx.com: did not receive HSTS header
|
||||
codereview.appspot.com: did not receive HSTS header (error ignored - included regardless)
|
||||
codereview.chromium.org: did not receive HSTS header (error ignored - included regardless)
|
||||
@ -910,6 +907,7 @@ cryptopartyatx.org: could not connect to host
|
||||
cryptopush.com: did not receive HSTS header
|
||||
crysadm.com: max-age too low: 1
|
||||
crystalclassics.co.uk: did not receive HSTS header
|
||||
csabg.org: could not connect to host
|
||||
csapak.com: max-age too low: 0
|
||||
csawctf.poly.edu: could not connect to host
|
||||
csfs.org.uk: could not connect to host
|
||||
@ -918,7 +916,7 @@ csgoelemental.com: could not connect to host
|
||||
csgokings.eu: could not connect to host
|
||||
csohack.tk: could not connect to host
|
||||
cspbuilder.info: could not connect to host
|
||||
csvape.com: could not connect to host
|
||||
csvape.com: did not receive HSTS header
|
||||
ct.search.yahoo.com: did not receive HSTS header
|
||||
cthulhuden.com: could not connect to host
|
||||
cubeserver.eu: could not connect to host
|
||||
@ -987,9 +985,8 @@ datenreiter.tk: could not connect to host
|
||||
datewon.net: did not receive HSTS header
|
||||
davidglidden.eu: could not connect to host
|
||||
davidgreig.uk: did not receive HSTS header
|
||||
davidgrudl.com: could not connect to host
|
||||
davidgrudl.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
davidhunter.scot: did not receive HSTS header
|
||||
davidlillo.com: could not connect to host
|
||||
davidnoren.com: did not receive HSTS header
|
||||
davidreinhardt.de: could not connect to host
|
||||
davidscherzer.at: could not connect to host
|
||||
@ -1040,7 +1037,7 @@ derevtsov.com: did not receive HSTS header
|
||||
derhil.de: did not receive HSTS header
|
||||
derwolfe.net: did not receive HSTS header
|
||||
desiccantpackets.com: did not receive HSTS header
|
||||
designgears.com: max-age too low: 10
|
||||
designgears.com: did not receive HSTS header
|
||||
designthinking.or.jp: did not receive HSTS header
|
||||
despora.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
destinationbijoux.fr: could not connect to host
|
||||
@ -1084,6 +1081,7 @@ dnsknowledge.com: did not receive HSTS header
|
||||
do-do.tk: could not connect to host
|
||||
do.search.yahoo.com: did not receive HSTS header
|
||||
dobet.in: could not connect to host
|
||||
dobrisan.ro: could not connect to host
|
||||
docid.io: could not connect to host
|
||||
docket.news: could not connect to host
|
||||
docs.google.com: did not receive HSTS header (error ignored - included regardless)
|
||||
@ -1098,6 +1096,7 @@ dollywiki.co.uk: could not connect to host
|
||||
dolphin-cloud.com: could not connect to host
|
||||
dolphincorp.co.uk: could not connect to host
|
||||
domaris.de: did not receive HSTS header
|
||||
dominicpratt.de: did not receive HSTS header
|
||||
dominique-mueller.de: did not receive HSTS header
|
||||
donttrustrobots.nl: could not connect to host
|
||||
donzelot.co.uk: max-age too low: 3600
|
||||
@ -1116,6 +1115,7 @@ doyoucheck.com: did not receive HSTS header
|
||||
dpratt.de: could not connect to host
|
||||
dragonisles.net: could not connect to host
|
||||
dragons-of-highlands.cz: could not connect to host
|
||||
dragonschool.org: did not receive HSTS header
|
||||
dragontrainingmobilezoo.com.au: max-age too low: 0
|
||||
draw.uy: could not connect to host
|
||||
drdevil.ru: could not connect to host
|
||||
@ -1190,6 +1190,7 @@ ehito.ovh: could not connect to host
|
||||
ehrenamt-skpfcw.de: could not connect to host
|
||||
eicfood.com: could not connect to host
|
||||
eidolonhost.com: did not receive HSTS header
|
||||
eimanavicius.lt: could not connect to host
|
||||
ekbanden.nl: could not connect to host
|
||||
elaintehtaat.fi: did not receive HSTS header
|
||||
elan-organics.com: did not receive HSTS header
|
||||
@ -1221,7 +1222,7 @@ emjimadhu.com: could not connect to host
|
||||
emmable.com: could not connect to host
|
||||
emnitech.com: could not connect to host
|
||||
empleosentorreon.mx: could not connect to host
|
||||
empleostampico.com: could not connect to host
|
||||
empleostampico.com: did not receive HSTS header
|
||||
enaah.de: could not connect to host
|
||||
enargia.jp: max-age too low: 0
|
||||
encode.space: did not receive HSTS header
|
||||
@ -1461,7 +1462,6 @@ franta.email: did not receive HSTS header
|
||||
franzt.de: could not connect to host
|
||||
franzt.ovh: could not connect to host
|
||||
frasys.io: max-age too low: 7776000
|
||||
frederikschoell.de: could not connect to host
|
||||
fredvoyage.fr: did not receive HSTS header
|
||||
freeflow.tv: could not connect to host
|
||||
freematthale.net: did not receive HSTS header
|
||||
@ -1474,7 +1474,6 @@ freeutopia.org: did not receive HSTS header
|
||||
freezion.com: could not connect to host
|
||||
frenzel.dk: could not connect to host
|
||||
freqlabs.com: could not connect to host
|
||||
freshdns.nl: did not receive HSTS header
|
||||
freshfind.xyz: could not connect to host
|
||||
freshlymind.com: did not receive HSTS header
|
||||
frezbo.com: could not connect to host
|
||||
@ -1591,7 +1590,6 @@ gglks.com: did not receive HSTS header
|
||||
gh16.com.ar: could not connect to host
|
||||
gheorghesarcov.ga: could not connect to host
|
||||
gheorghesarcov.tk: could not connect to host
|
||||
giakki.eu: could not connect to host
|
||||
gietvloergarant.nl: did not receive HSTS header
|
||||
gigacloud.org: max-age too low: 0
|
||||
gilgaz.com: did not receive HSTS header
|
||||
@ -1625,7 +1623,6 @@ gmoes.at: max-age too low: 600000
|
||||
gnom.me: could not connect to host
|
||||
go.ax: did not receive HSTS header
|
||||
go2sh.de: did not receive HSTS header
|
||||
go4it.solutions: could not connect to host
|
||||
goabonga.com: could not connect to host
|
||||
goaltree.ch: did not receive HSTS header
|
||||
goarmy.eu: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
@ -1700,12 +1697,7 @@ gulenet.com: could not connect to host
|
||||
gunnarhafdal.com: did not receive HSTS header
|
||||
gurom.lv: could not connect to host
|
||||
gurusupe.com: could not connect to host
|
||||
guso.gq: could not connect to host
|
||||
guso.ml: could not connect to host
|
||||
guso.site: could not connect to host
|
||||
guso.tech: could not connect to host
|
||||
gussi.is: did not receive HSTS header
|
||||
gvatas.in: could not connect to host
|
||||
gvt2.com: could not connect to host (error ignored - included regardless)
|
||||
gvt3.com: could not connect to host (error ignored - included regardless)
|
||||
gw2reload.eu: could not connect to host
|
||||
@ -1715,7 +1707,6 @@ gxlrx.net: could not connect to host
|
||||
gyboche.com: could not connect to host
|
||||
gyboche.science: could not connect to host
|
||||
gycis.me: could not connect to host
|
||||
gypsycatdreams.com: could not connect to host
|
||||
gypthecat.com: max-age too low: 604800
|
||||
gyz.io: could not connect to host
|
||||
h2check.org: could not connect to host
|
||||
@ -1748,9 +1739,9 @@ hansen.hn: could not connect to host
|
||||
hao2taiwan.com: max-age too low: 0
|
||||
haoyugao.com: could not connect to host
|
||||
hapissl.com: could not connect to host
|
||||
hapivm.com: could not connect to host
|
||||
happyfabric.me: did not receive HSTS header
|
||||
happygastro.com: could not connect to host
|
||||
hapvm.com: could not connect to host
|
||||
harabuhouse.com: did not receive HSTS header
|
||||
harbor-light.net: could not connect to host
|
||||
hardline.xyz: could not connect to host
|
||||
@ -1785,8 +1776,8 @@ hdwallpapers.net: did not receive HSTS header
|
||||
healtious.com: did not receive HSTS header
|
||||
heart.ge: did not receive HSTS header
|
||||
heartlandrentals.com: did not receive HSTS header
|
||||
hectorj.net: could not connect to host
|
||||
heftkaufen.de: did not receive HSTS header
|
||||
hellomouse.cf: did not receive HSTS header
|
||||
helloworldhost.com: did not receive HSTS header
|
||||
helpadmin.net: could not connect to host
|
||||
helpium.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
@ -1794,6 +1785,8 @@ helpmebuild.com: did not receive HSTS header
|
||||
hemdal.se: could not connect to host
|
||||
hencagon.com: could not connect to host
|
||||
henriknoerr.com: could not connect to host
|
||||
henrock.net: could not connect to host
|
||||
hepteract.us: could not connect to host
|
||||
hermes-net.de: could not connect to host
|
||||
herpaderp.net: could not connect to host
|
||||
herrenfahrt.com: did not receive HSTS header
|
||||
@ -1960,6 +1953,7 @@ infosec.rip: could not connect to host
|
||||
infotics.es: did not receive HSTS header
|
||||
injigo.com: did not receive HSTS header
|
||||
inkable.com.au: did not receive HSTS header
|
||||
inked-guy.de: did not receive HSTS header
|
||||
inkedguy.de: could not connect to host
|
||||
inkstory.gr: did not receive HSTS header
|
||||
inksupply.com: did not receive HSTS header
|
||||
@ -1983,7 +1977,6 @@ intel.li: could not connect to host
|
||||
intelldynamics.com: could not connect to host
|
||||
interference.io: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
interlun.com: could not connect to host
|
||||
internect.co.za: did not receive HSTS header
|
||||
internetcasinos.de: could not connect to host
|
||||
internetcensus.org: could not connect to host
|
||||
interserved.com: did not receive HSTS header
|
||||
@ -2071,7 +2064,7 @@ jannyrijneveld.nl: did not receive HSTS header
|
||||
janus-engineering.de: did not receive HSTS header
|
||||
japlex.com: could not connect to host
|
||||
jaqen.ch: could not connect to host
|
||||
jardins-utopie.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
jardins-utopie.net: could not connect to host
|
||||
jaredeberle.org: did not receive HSTS header
|
||||
jaroslavtrsek.cz: did not receive HSTS header
|
||||
jartza.org: could not connect to host
|
||||
@ -2111,6 +2104,7 @@ jhburton.uk: could not connect to host
|
||||
jhejderup.me: could not connect to host
|
||||
jia1hao.com: could not connect to host
|
||||
jiaidu.com: could not connect to host
|
||||
jichi.io: could not connect to host
|
||||
jikken.de: could not connect to host
|
||||
jimas.eu: did not receive HSTS header
|
||||
jimmycai.org: could not connect to host
|
||||
@ -2131,7 +2125,7 @@ jonasgroth.se: did not receive HSTS header
|
||||
jonathan.ir: could not connect to host
|
||||
jonathancarter.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
jonn.me: could not connect to host
|
||||
joostbovee.nl: did not receive HSTS header
|
||||
joostbovee.nl: could not connect to host
|
||||
jordanhamilton.me: could not connect to host
|
||||
joretapo.fr: could not connect to host
|
||||
josahrens.me: could not connect to host
|
||||
@ -2171,8 +2165,8 @@ kaela.design: could not connect to host
|
||||
kahopoon.net: could not connect to host
|
||||
kaisers.de: did not receive HSTS header
|
||||
kalami.nl: did not receive HSTS header
|
||||
kaleidomarketing.com: could not connect to host
|
||||
kaliaa.fi: could not connect to host
|
||||
kalian.cz: could not connect to host
|
||||
kamikano.com: could not connect to host
|
||||
kaneo-gmbh.de: did not receive HSTS header
|
||||
kaplatz.is: could not connect to host
|
||||
@ -2246,7 +2240,6 @@ kleertjesvoordelig.nl: did not receive HSTS header
|
||||
kleinblogje.nl: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
kletterkater.com: did not receive HSTS header
|
||||
klicktojob.de: could not connect to host
|
||||
km-net.pl: could not connect to host
|
||||
kmartin.io: did not receive HSTS header
|
||||
knccloud.com: could not connect to host
|
||||
knightsbridgegroup.org: could not connect to host
|
||||
@ -2297,6 +2290,7 @@ kura.io: could not connect to host
|
||||
kurehun.org: could not connect to host
|
||||
kurtmclester.com: did not receive HSTS header
|
||||
kusaka-abacus.jp: max-age too low: 0
|
||||
kvhile.com: could not connect to host
|
||||
kweddingplanning.com: did not receive HSTS header
|
||||
kwok.tv: could not connect to host
|
||||
kyanite.co: could not connect to host
|
||||
@ -2341,7 +2335,6 @@ lbrt.xyz: could not connect to host
|
||||
ldarby.me.uk: could not connect to host
|
||||
leadership9.com: could not connect to host
|
||||
leardev.de: did not receive HSTS header
|
||||
learnedovo.com: could not connect to host
|
||||
learnfrenchfluently.com: did not receive HSTS header
|
||||
learningorder.com: could not connect to host
|
||||
lechiennoir.net: did not receive HSTS header
|
||||
@ -2363,7 +2356,6 @@ leopold.email: could not connect to host
|
||||
leopotamgroup.com: could not connect to host
|
||||
leovanna.co.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
lepont.pl: could not connect to host
|
||||
lerasenglish.com: did not receive HSTS header
|
||||
lerner.moscow: did not receive HSTS header
|
||||
les-corsaires.net: could not connect to host
|
||||
lesdouceursdeliyana.com: could not connect to host
|
||||
@ -2431,6 +2423,7 @@ litespeed.io: could not connect to host
|
||||
livedemo.io: could not connect to host
|
||||
livej.am: could not connect to host
|
||||
livi.co: did not receive HSTS header
|
||||
lmerza.com: could not connect to host
|
||||
loadingdeck.com: did not receive HSTS header
|
||||
loadso.me: could not connect to host
|
||||
loafbox.com: could not connect to host
|
||||
@ -2439,7 +2432,6 @@ locktheirphone.com: could not connect to host
|
||||
locomotive.ca: did not receive HSTS header
|
||||
login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless)
|
||||
loginseite.com: could not connect to host
|
||||
lolicore.ch: could not connect to host
|
||||
lonal.com: could not connect to host
|
||||
londonlanguageexchange.com: could not connect to host
|
||||
look-at-my.site: could not connect to host
|
||||
@ -2456,7 +2448,6 @@ lostinsecurity.com: could not connect to host
|
||||
lostinweb.eu: could not connect to host
|
||||
lothai.re: could not connect to host
|
||||
lotsencafe.de: did not receive HSTS header
|
||||
loveandadoreboutique.com: could not connect to host
|
||||
lovelifelovelive.com: could not connect to host
|
||||
lovelive.us: did not receive HSTS header
|
||||
lovelyblogacademy.com: did not receive HSTS header
|
||||
@ -2466,7 +2457,7 @@ lowhangingfruitgrabber.com: could not connect to host
|
||||
lpak.nl: could not connect to host
|
||||
lrhsclubs.com: could not connect to host
|
||||
lrhstsa.com: could not connect to host
|
||||
ls-a.org: could not connect to host
|
||||
ls-a.org: did not receive HSTS header
|
||||
lsky.cn: did not receive HSTS header
|
||||
lsp-sports.de: did not receive HSTS header
|
||||
lt.search.yahoo.com: did not receive HSTS header
|
||||
@ -2544,11 +2535,10 @@ maomaofuli.vip: could not connect to host
|
||||
marchagen.nl: did not receive HSTS header
|
||||
marcontrol.com: did not receive HSTS header
|
||||
marcush.de: did not receive HSTS header
|
||||
marcuskoh.com: could not connect to host
|
||||
marcuskoh.com: did not receive HSTS header
|
||||
mariannematthew.com: could not connect to host
|
||||
marie-curie.fr: could not connect to host
|
||||
marie-elisabeth.dk: did not receive HSTS header
|
||||
marie.club: could not connect to host
|
||||
mario.party: did not receive HSTS header
|
||||
markaconnor.com: could not connect to host
|
||||
markayapilandirma.com: could not connect to host
|
||||
@ -2577,8 +2567,8 @@ matsuz.com: could not connect to host
|
||||
mattberryman.com: did not receive HSTS header
|
||||
mattcoles.io: did not receive HSTS header
|
||||
mattfin.ch: could not connect to host
|
||||
matthewgrill.com: could not connect to host
|
||||
matthewprenger.com: could not connect to host
|
||||
matthiasadler.info: could not connect to host
|
||||
matthiassteen.be: max-age too low: 0
|
||||
mattsvensson.com: did not receive HSTS header
|
||||
mattwb65.com: could not connect to host
|
||||
@ -2602,6 +2592,7 @@ mdfnet.se: did not receive HSTS header
|
||||
mdscomp.net: did not receive HSTS header
|
||||
mea.in.ua: could not connect to host
|
||||
meamod.com: did not receive HSTS header
|
||||
mebio.us: did not receive HSTS header
|
||||
mechanus.io: max-age too low: 2592000
|
||||
medallia.io: could not connect to host
|
||||
media-courses.com: did not receive HSTS header
|
||||
@ -2690,6 +2681,7 @@ mini2.fi: max-age too low: 0
|
||||
minikneet.com: did not receive HSTS header
|
||||
minikneet.nl: did not receive HSTS header
|
||||
minnesotadata.com: could not connect to host
|
||||
minora.io: could not connect to host
|
||||
miragrow.com: could not connect to host
|
||||
mirindadomo.ru: did not receive HSTS header
|
||||
mironized.com: did not receive HSTS header
|
||||
@ -2719,7 +2711,7 @@ mobilethreat.net: could not connect to host
|
||||
mobilethreatnetwork.net: could not connect to host
|
||||
mobilpass.no: could not connect to host
|
||||
mocloud.eu: could not connect to host
|
||||
model9.io: could not connect to host
|
||||
model9.io: did not receive HSTS header
|
||||
modemagazines.co.uk: could not connect to host
|
||||
moebel-nagel.de: did not receive HSTS header
|
||||
moelord.org: could not connect to host
|
||||
@ -2742,7 +2734,6 @@ mor.gl: could not connect to host
|
||||
morethanadream.lv: could not connect to host
|
||||
moriz.net: could not connect to host
|
||||
morningcalculation.com: could not connect to host
|
||||
morotech.com.br: did not receive HSTS header
|
||||
morpork.xyz: could not connect to host
|
||||
mortgagecentersmo.com: did not receive HSTS header
|
||||
morz.org: could not connect to host
|
||||
@ -2816,7 +2807,6 @@ myphonebox.de: could not connect to host
|
||||
myraytech.net: did not receive HSTS header
|
||||
mysecretrewards.com: did not receive HSTS header
|
||||
mystery-science-theater-3000.de: did not receive HSTS header
|
||||
mythslegendscollection.com: did not receive HSTS header
|
||||
myvirtualserver.com: max-age too low: 2592000
|
||||
myzone.com: did not receive HSTS header
|
||||
n0psled.nl: could not connect to host
|
||||
@ -2874,6 +2864,7 @@ netbox.cc: could not connect to host
|
||||
netherwind.eu: did not receive HSTS header
|
||||
netloanusa.com: max-age too low: 0
|
||||
netmagik.com: did not receive HSTS header
|
||||
netronix.be: could not connect to host
|
||||
nettefoundation.com: could not connect to host
|
||||
netulo.com: could not connect to host
|
||||
netzbit.de: could not connect to host
|
||||
@ -2900,13 +2891,11 @@ ngine.ch: did not receive HSTS header
|
||||
nginxnudes.com: could not connect to host
|
||||
nglr.org: could not connect to host
|
||||
ngt-service.ru: did not receive HSTS header
|
||||
nhome.ba: could not connect to host
|
||||
ni.search.yahoo.com: did not receive HSTS header
|
||||
nibiisclaim.com: could not connect to host
|
||||
nicestresser.fr: could not connect to host
|
||||
nicky.io: did not receive HSTS header
|
||||
nicoborghuis.nl: could not connect to host
|
||||
nicolas-simond.com: did not receive HSTS header
|
||||
nicolasbettag.me: did not receive HSTS header
|
||||
niconiconi.xyz: could not connect to host
|
||||
niconode.com: could not connect to host
|
||||
@ -2935,9 +2924,8 @@ nodetemple.com: could not connect to host
|
||||
nodi.at: could not connect to host
|
||||
noexpect.org: could not connect to host
|
||||
noima.com: did not receive HSTS header
|
||||
noisky.cn: could not connect to host
|
||||
nolatepayments.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
nolberg.net: could not connect to host
|
||||
nolberg.net: did not receive HSTS header
|
||||
nolte.work: could not connect to host
|
||||
nomorebytes.de: did not receive HSTS header
|
||||
noobunbox.net: did not receive HSTS header
|
||||
@ -3002,9 +2990,6 @@ oasisim.net: [Exception... "Component returned failure code: 0x80004005 (NS_ERRO
|
||||
oauth-dropins.appspot.com: did not receive HSTS header
|
||||
obsydian.org: could not connect to host
|
||||
occentus.net: did not receive HSTS header
|
||||
oceandns.eu: did not receive HSTS header
|
||||
oceandns.net: did not receive HSTS header
|
||||
oceandns.nl: did not receive HSTS header
|
||||
ochaken.cf: could not connect to host
|
||||
odifi.com: could not connect to host
|
||||
odin.xxx: did not receive HSTS header
|
||||
@ -3129,6 +3114,7 @@ pagetoimage.com: could not connect to host
|
||||
pahae.de: did not receive HSTS header
|
||||
paintingat.com: could not connect to host
|
||||
paisaone.com: did not receive HSTS header
|
||||
pajuvuo.fi: could not connect to host
|
||||
paku.me: could not connect to host
|
||||
pamplona.tv: could not connect to host
|
||||
pamsoft.pl: max-age too low: 0
|
||||
@ -3178,7 +3164,7 @@ payroll.ch: did not receive HSTS header
|
||||
pbapp.net: did not receive HSTS header
|
||||
pbprint.ru: max-age too low: 0
|
||||
pc-nf.de: did not receive HSTS header
|
||||
pcfun.net: did not receive HSTS header
|
||||
pcfun.net: could not connect to host
|
||||
pchax.net: could not connect to host
|
||||
pdevio.com: could not connect to host
|
||||
pdf.yt: could not connect to host
|
||||
@ -3346,6 +3332,7 @@ proxybay.club: could not connect to host
|
||||
proxybay.info: did not receive HSTS header
|
||||
prxio.site: did not receive HSTS header
|
||||
prytkov.com: did not receive HSTS header
|
||||
pstudio.me: could not connect to host
|
||||
psw.academy: did not receive HSTS header
|
||||
psw.consulting: did not receive HSTS header
|
||||
ptn.moscow: could not connect to host
|
||||
@ -3422,7 +3409,7 @@ raydan.space: could not connect to host
|
||||
raydobe.me: could not connect to host
|
||||
rbhighinc.org: could not connect to host
|
||||
rc-rp.com: did not receive HSTS header
|
||||
rc4.io: could not connect to host
|
||||
rc4.io: did not receive HSTS header
|
||||
rcafox.com: could not connect to host
|
||||
rcpcbd.com: did not receive HSTS header
|
||||
rdns.im: did not receive HSTS header
|
||||
@ -3431,7 +3418,6 @@ readr.pw: could not connect to host
|
||||
realmic.net: could not connect to host
|
||||
realmofespionage.com: could not connect to host
|
||||
reardenporn.com: could not connect to host
|
||||
rechenknaecht.de: could not connect to host
|
||||
recommended.reviews: could not connect to host
|
||||
redar.xyz: did not receive HSTS header
|
||||
reddiseals.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
@ -3465,6 +3451,7 @@ renrenss.com: did not receive HSTS header
|
||||
rentacarcluj.xyz: could not connect to host
|
||||
rentcarassist.com: could not connect to host
|
||||
renteater.com: could not connect to host
|
||||
rentinsingapore.com.sg: did not receive HSTS header
|
||||
replacemychina.com: could not connect to host
|
||||
reprolife.co.uk: max-age too low: 0
|
||||
res-rheingau.de: did not receive HSTS header
|
||||
@ -3521,7 +3508,7 @@ rodosto.com: did not receive HSTS header
|
||||
roeper.party: could not connect to host
|
||||
roesemann.email: could not connect to host
|
||||
rohitagr.com: did not receive HSTS header
|
||||
rolemaster.net: could not connect to host
|
||||
rolemaster.net: did not receive HSTS header
|
||||
romans-place.me.uk: did not receive HSTS header
|
||||
romulusapp.com: could not connect to host
|
||||
ron2k.za.net: could not connect to host
|
||||
@ -3547,7 +3534,6 @@ rsmaps.org: could not connect to host
|
||||
rubbereggs.ca: could not connect to host
|
||||
rubberfurs.org: max-age too low: 86400
|
||||
rubecodeberg.com: could not connect to host
|
||||
rubendv.be: could not connect to host
|
||||
rubenschulz.nl: did not receive HSTS header
|
||||
ruborr.se: did not receive HSTS header
|
||||
rubyshop.nl: max-age too low: 604800
|
||||
@ -3743,6 +3729,7 @@ sifls.com: could not connect to host
|
||||
sig6.org: could not connect to host
|
||||
sigabrt.org: could not connect to host
|
||||
sigterm.no: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
silentcircle.com: did not receive HSTS header
|
||||
silentcircle.org: could not connect to host
|
||||
silicagelpackets.ca: did not receive HSTS header
|
||||
silver-drachenkrieger.de: did not receive HSTS header
|
||||
@ -3771,7 +3758,6 @@ sitesten.com: did not receive HSTS header
|
||||
sitsy.ru: did not receive HSTS header
|
||||
sixtwentyten.com: did not receive HSTS header
|
||||
skhosting.eu: did not receive HSTS header
|
||||
skidstresser.com: could not connect to host
|
||||
skile.ru: could not connect to host
|
||||
skillproxy.com: could not connect to host
|
||||
skillproxy.net: could not connect to host
|
||||
@ -3810,6 +3796,7 @@ smove.sg: did not receive HSTS header
|
||||
smusg.com: did not receive HSTS header
|
||||
snailing.org: could not connect to host
|
||||
snakehosting.dk: did not receive HSTS header
|
||||
snapappointments.com: did not receive HSTS header
|
||||
snapappts.com: could not connect to host
|
||||
snapworks.net: did not receive HSTS header
|
||||
sneberger.cz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
@ -3855,7 +3842,6 @@ souyar.net: could not connect to host
|
||||
souyar.us: could not connect to host
|
||||
sovereignshare.com: could not connect to host
|
||||
sown.dyndns.org: could not connect to host
|
||||
space-it.de: could not connect to host
|
||||
spacehq.org: max-age too low: 0
|
||||
sparelib.com: max-age too low: 3650
|
||||
spark.team: could not connect to host
|
||||
@ -3924,6 +3910,7 @@ stationnementdenuit.ca: did not receive HSTS header
|
||||
statuschecks.net: could not connect to host
|
||||
stayokhotelscdc-mailing.com: could not connect to host
|
||||
stcomex.com: did not receive HSTS header
|
||||
stderr.cc: could not connect to host
|
||||
stefanweiser.de: did not receive HSTS header
|
||||
stephanierxo.com: did not receive HSTS header
|
||||
stephenandburns.com: did not receive HSTS header
|
||||
@ -3935,7 +3922,7 @@ stillblackhat.id: could not connect to host
|
||||
stirlingpoon.xyz: could not connect to host
|
||||
stkbn.com: did not receive HSTS header
|
||||
stmbgr.com: could not connect to host
|
||||
stn.me.uk: did not receive HSTS header
|
||||
stn.me.uk: could not connect to host
|
||||
stocktrade.de: could not connect to host
|
||||
stoffe-monster.de: did not receive HSTS header
|
||||
stole-my.bike: could not connect to host
|
||||
@ -3955,6 +3942,7 @@ streams.dyndns.org: could not connect to host
|
||||
strictlysudo.com: could not connect to host
|
||||
strivephysmed.com: did not receive HSTS header
|
||||
stroeercrm.de: could not connect to host
|
||||
strom.family: could not connect to host
|
||||
strongest-privacy.com: could not connect to host
|
||||
stuartbaxter.co: could not connect to host
|
||||
student-scientist.org: did not receive HSTS header
|
||||
@ -3981,7 +3969,6 @@ suksit.com: could not connect to host
|
||||
sumoatm.com: did not receive HSTS header
|
||||
sumoscout.de: did not receive HSTS header
|
||||
suncountrymarine.com: did not receive HSTS header
|
||||
sunflyer.cn: did not receive HSTS header
|
||||
sunnyfruit.ru: did not receive HSTS header
|
||||
sunshinepress.org: could not connect to host
|
||||
supcro.com: could not connect to host
|
||||
@ -4167,6 +4154,7 @@ thomaskliszowski.fr: did not receive HSTS header
|
||||
thomaswoo.com: could not connect to host
|
||||
thorncreek.net: did not receive HSTS header
|
||||
thriveapproach.co.uk: did not receive HSTS header
|
||||
thrx.net: could not connect to host
|
||||
thumbtack.com: did not receive HSTS header
|
||||
thusoy.com: did not receive HSTS header
|
||||
tibbitshall.ca: did not receive HSTS header
|
||||
@ -4191,6 +4179,7 @@ timotrans.de: did not receive HSTS header
|
||||
timotrans.eu: did not receive HSTS header
|
||||
timowi.de: could not connect to host
|
||||
timowi.net: could not connect to host
|
||||
timvivian.ca: could not connect to host
|
||||
timwittenberg.com: could not connect to host
|
||||
tipbox.is: could not connect to host
|
||||
tipsyk.ru: could not connect to host
|
||||
@ -4232,6 +4221,7 @@ tommyads.com: could not connect to host
|
||||
tomudding.nl: did not receive HSTS header
|
||||
tonburi.jp: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
tonyfantjr.com: could not connect to host
|
||||
tonyw.xyz: could not connect to host
|
||||
toomanypillows.com: could not connect to host
|
||||
topbargains.com.au: did not receive HSTS header
|
||||
topdeskdev.net: could not connect to host
|
||||
@ -4259,6 +4249,7 @@ transportal.sk: did not receive HSTS header
|
||||
travelinsurance.co.nz: did not receive HSTS header
|
||||
treeby.net: could not connect to host
|
||||
trendberry.ru: could not connect to host
|
||||
trik.es: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
trinityaffirmations.com: max-age too low: 0
|
||||
trinitycore.org: max-age too low: 2592000
|
||||
tripdelta.com: did not receive HSTS header
|
||||
@ -4306,6 +4297,7 @@ txclimbers.com: could not connect to host
|
||||
txf.pw: could not connect to host
|
||||
ty2u.com: did not receive HSTS header
|
||||
tylian.net: max-age too low: 0
|
||||
typingrevolution.com: did not receive HSTS header
|
||||
tyrelius.com: did not receive HSTS header
|
||||
tyroproducts.eu: did not receive HSTS header
|
||||
tzappa.net: could not connect to host
|
||||
@ -4351,8 +4343,6 @@ unitlabs.net: could not connect to host
|
||||
university4industry.com: did not receive HSTS header
|
||||
univz.com: could not connect to host
|
||||
unknownphenomena.net: could not connect to host
|
||||
unmanaged.space: could not connect to host
|
||||
uno-pizza.ru: could not connect to host
|
||||
unplugg3r.dk: could not connect to host
|
||||
unravel.ie: could not connect to host
|
||||
unsystem.net: did not receive HSTS header
|
||||
@ -4371,6 +4361,7 @@ url.rw: did not receive HSTS header
|
||||
urphp.com: could not connect to host
|
||||
us-immigration.com: did not receive HSTS header
|
||||
usaa.com: did not receive HSTS header
|
||||
usbtypeccompliant.com: could not connect to host
|
||||
uscitizenship.info: did not receive HSTS header
|
||||
uscurrency.gov: did not receive HSTS header
|
||||
used-in.jp: did not receive HSTS header
|
||||
@ -4379,6 +4370,7 @@ ustr.gov: max-age too low: 86400
|
||||
utleieplassen.no: could not connect to host
|
||||
utopiagalaxy.space: could not connect to host
|
||||
utopianhomespa.com: did not receive HSTS header
|
||||
uttnetgroup.fr: could not connect to host
|
||||
utumno.ch: could not connect to host
|
||||
utvbloggen.se: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
uvarov.pw: did not receive HSTS header
|
||||
@ -4427,6 +4419,7 @@ videnskabsklubben.dk: did not receive HSTS header
|
||||
videomuz.com: did not receive HSTS header
|
||||
vidz.ga: could not connect to host
|
||||
vieaw.com: could not connect to host
|
||||
vietnamchevrolet.net: did not receive HSTS header
|
||||
viewsea.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
vigilo.cf: could not connect to host
|
||||
viktorsvantesson.net: did not receive HSTS header
|
||||
@ -4472,7 +4465,7 @@ w-spotlight.appspot.com: did not receive HSTS header (error ignored - included r
|
||||
w4a.fr: did not receive HSTS header
|
||||
w4xzr.top: could not connect to host
|
||||
w4xzr.xyz: could not connect to host
|
||||
wachtwoordencheck.nl: did not receive HSTS header
|
||||
wachtwoordencheck.nl: could not connect to host
|
||||
waixingrenfuli.vip: could not connect to host
|
||||
waixingrenfuli7.vip: could not connect to host
|
||||
wakapp.de: could not connect to host
|
||||
@ -4530,6 +4523,7 @@ webtiles.co.uk: could not connect to host
|
||||
webtobesocial.de: could not connect to host
|
||||
webwork.pw: could not connect to host
|
||||
weddingenvelopes.co.uk: did not receive HSTS header
|
||||
weissman.agency: did not receive HSTS header
|
||||
weizenke.im: could not connect to host
|
||||
wellastore.ru: did not receive HSTS header
|
||||
wellsolveit.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
@ -4566,7 +4560,6 @@ whatsstalk.me: could not connect to host
|
||||
when-release.com: did not receive HSTS header
|
||||
whiskeyriver.co.uk: max-age too low: 0
|
||||
whitehat.id: could not connect to host
|
||||
whitelabelcashback.nl: did not receive HSTS header
|
||||
whiterabbitcakery.com: could not connect to host
|
||||
whitestagforge.com: did not receive HSTS header
|
||||
whoclicks.net: could not connect to host
|
||||
@ -4575,6 +4568,7 @@ wholebites.com: did not receive HSTS header
|
||||
whoshotya.de: did not receive HSTS header
|
||||
whysuck.com: could not connect to host
|
||||
whyworldhot.com: could not connect to host
|
||||
widememory.com: could not connect to host
|
||||
wienholding.at: max-age too low: 0
|
||||
wieninternational.at: did not receive HSTS header
|
||||
wiire.me: could not connect to host
|
||||
@ -4623,7 +4617,6 @@ woording.com: could not connect to host
|
||||
wootton95.com: could not connect to host
|
||||
woresite.jp: did not receive HSTS header
|
||||
workfone.io: did not receive HSTS header
|
||||
wow-foederation.de: could not connect to host
|
||||
wowapi.org: could not connect to host
|
||||
wphostingspot.com: did not receive HSTS header
|
||||
wpmetadatastandardsproject.org: could not connect to host
|
||||
@ -4633,7 +4626,7 @@ wufu.org: did not receive HSTS header
|
||||
wuhengmin.com: did not receive HSTS header
|
||||
wurzelzwerg.net: could not connect to host
|
||||
wusx.club: could not connect to host
|
||||
www.apollo-auto.com: could not connect to host
|
||||
www.apollo-auto.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
www.braintreepayments.com: did not receive HSTS header
|
||||
www.calyxinstitute.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 121" data: no]
|
||||
www.cueup.com: could not connect to host
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -725,7 +725,7 @@ mochitest-media:
|
||||
chunks:
|
||||
by-test-platform:
|
||||
android.*: 3
|
||||
default: 1
|
||||
default: 3
|
||||
docker-image: {"in-tree": "desktop1604-test"}
|
||||
mozharness:
|
||||
by-test-platform:
|
||||
|
@ -32,12 +32,12 @@ this.assert = {};
|
||||
* @return {string}
|
||||
* Session ID.
|
||||
*
|
||||
* @throws {InvalidSessionIdError}
|
||||
* @throws {InvalidSessionIDError}
|
||||
* If |driver| does not have a session ID.
|
||||
*/
|
||||
assert.session = function (driver, msg = "") {
|
||||
assert.that(sessionID => sessionID,
|
||||
msg, InvalidSessionIdError)(driver.sessionId);
|
||||
msg, InvalidSessionIDError)(driver.sessionId);
|
||||
return driver.sessionId;
|
||||
};
|
||||
|
||||
|
@ -22,6 +22,14 @@ from .geckoinstance import GeckoInstance
|
||||
from .keys import Keys
|
||||
from .timeout import Timeouts
|
||||
|
||||
try:
|
||||
from mozbuild.base import (
|
||||
MozbuildObject
|
||||
)
|
||||
build = MozbuildObject.from_environment()
|
||||
except ImportError:
|
||||
build = None
|
||||
|
||||
WEBELEMENT_KEY = "ELEMENT"
|
||||
W3C_WEBELEMENT_KEY = "element-6066-11e4-a52e-4f735466cecf"
|
||||
|
||||
@ -580,7 +588,10 @@ class Marionette(object):
|
||||
"""
|
||||
self.host = host
|
||||
self.port = self.local_port = int(port)
|
||||
self.bin = bin
|
||||
if bin is None and build is not None:
|
||||
self.bin = build.get_binary_path()
|
||||
else:
|
||||
self.bin = bin
|
||||
self.client = None
|
||||
self.instance = None
|
||||
self.session = None
|
||||
|
@ -13,7 +13,7 @@ const ERRORS = new Set([
|
||||
"InvalidArgumentError",
|
||||
"InvalidElementStateError",
|
||||
"InvalidSelectorError",
|
||||
"InvalidSessionIdError",
|
||||
"InvalidSessionIDError",
|
||||
"JavaScriptError",
|
||||
"NoAlertOpenError",
|
||||
"NoSuchElementError",
|
||||
@ -81,25 +81,15 @@ error.isWebDriverError = function (obj) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Wraps an Error prototype in a WebDriverError. If the given error is
|
||||
* already a WebDriverError, this is effectively a no-op.
|
||||
* Wraps any error as a WebDriverError. If the given error is already in
|
||||
* the WebDriverError prototype chain, this function returns it
|
||||
* unmodified.
|
||||
*/
|
||||
error.wrap = function (err) {
|
||||
if (error.isWebDriverError(err)) {
|
||||
return err;
|
||||
}
|
||||
return new WebDriverError(`${err.name}: ${err.message}`, err.stack);
|
||||
};
|
||||
|
||||
/**
|
||||
* Wraps an Error as a WebDriverError type. If the given error is already
|
||||
* in the WebDriverError prototype chain, this function acts as a no-op.
|
||||
*/
|
||||
error.wrap = function (err) {
|
||||
if (error.isWebDriverError(err)) {
|
||||
return err;
|
||||
}
|
||||
return new WebDriverError(err.message, err.stacktrace);
|
||||
return new WebDriverError(err);
|
||||
};
|
||||
|
||||
/**
|
||||
@ -107,7 +97,7 @@ error.wrap = function (err) {
|
||||
* and reports error to the Browser Console.
|
||||
*/
|
||||
error.report = function (err) {
|
||||
let msg = `Marionette threw an error: ${error.stringify(err)}`;
|
||||
let msg = "Marionette threw an error: " + error.stringify(err);
|
||||
dump(msg + "\n");
|
||||
if (Cu.reportError) {
|
||||
Cu.reportError(msg);
|
||||
@ -155,266 +145,266 @@ error.pprint = function (strings, ...values) {
|
||||
return res.join("");
|
||||
};
|
||||
|
||||
/**
|
||||
* Marshal a WebDriverError prototype to a JSON dictionary.
|
||||
*
|
||||
* @param {WebDriverError} err
|
||||
* Error to serialise.
|
||||
*
|
||||
* @return {Object.<string, Object>}
|
||||
* JSON dictionary with the keys "error", "message", and "stacktrace".
|
||||
* @throws {TypeError}
|
||||
* If error type is not serialisable.
|
||||
*/
|
||||
error.toJson = function (err) {
|
||||
if (!error.isWebDriverError(err)) {
|
||||
throw new TypeError(`Unserialisable error type: ${err}`);
|
||||
}
|
||||
|
||||
let json = {
|
||||
error: err.status,
|
||||
message: err.message || "",
|
||||
stacktrace: err.stack || "",
|
||||
};
|
||||
return json;
|
||||
};
|
||||
|
||||
/**
|
||||
* Unmarshal a JSON dictionary to a WebDriverError prototype.
|
||||
*
|
||||
* @param {Object.<string, string>} json
|
||||
* JSON dictionary with the keys "error", "message", and "stacktrace".
|
||||
*
|
||||
* @return {WebDriverError}
|
||||
* Deserialised error prototype.
|
||||
*/
|
||||
error.fromJson = function (json) {
|
||||
if (!statusLookup.has(json.error)) {
|
||||
throw new TypeError(`Undeserialisable error type: ${json.error}`);
|
||||
}
|
||||
|
||||
let errCls = statusLookup.get(json.error);
|
||||
let err = new errCls(json.message);
|
||||
if ("stacktrace" in json) {
|
||||
err.stack = json.stacktrace;
|
||||
}
|
||||
return err;
|
||||
};
|
||||
|
||||
/**
|
||||
* WebDriverError is the prototypal parent of all WebDriver errors.
|
||||
* It should not be used directly, as it does not correspond to a real
|
||||
* error in the specification.
|
||||
*
|
||||
* @param {(string|Error)=} err
|
||||
* Optional string describing error situation or Error instance
|
||||
* to propagate.
|
||||
*/
|
||||
this.WebDriverError = function (err) {
|
||||
const proto = Error.call(this, err);
|
||||
this.name = "WebDriverError";
|
||||
this.status = "webdriver error";
|
||||
class WebDriverError extends Error {
|
||||
/**
|
||||
* @param {(string|Error)=} x
|
||||
* Optional string describing error situation or Error instance
|
||||
* to propagate.
|
||||
*/
|
||||
constructor (x) {
|
||||
super(x);
|
||||
this.name = this.constructor.name;
|
||||
this.status = "webdriver error";
|
||||
|
||||
if (error.isError(err)) {
|
||||
this.message = err.message;
|
||||
this.stack = err.stack;
|
||||
} else {
|
||||
this.message = err;
|
||||
this.stack = proto.stack;
|
||||
// Error's ctor does not preserve x' stack
|
||||
if (error.isError(x)) {
|
||||
this.stack = x.stack;
|
||||
}
|
||||
}
|
||||
};
|
||||
WebDriverError.prototype = Object.create(Error.prototype);
|
||||
|
||||
this.ElementNotAccessibleError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "ElementNotAccessibleError";
|
||||
this.status = "element not accessible";
|
||||
};
|
||||
ElementNotAccessibleError.prototype = Object.create(WebDriverError.prototype);
|
||||
toJSON () {
|
||||
return {
|
||||
error: this.status,
|
||||
message: this.message || "",
|
||||
stacktrace: this.stack || "",
|
||||
}
|
||||
}
|
||||
|
||||
this.ElementNotVisibleError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "ElementNotVisibleError";
|
||||
this.status = "element not visible";
|
||||
};
|
||||
ElementNotVisibleError.prototype = Object.create(WebDriverError.prototype);
|
||||
static fromJSON (json) {
|
||||
if (typeof json.error == "undefined") {
|
||||
let s = JSON.stringify(json);
|
||||
throw new TypeError("Undeserialisable error type: " + s);
|
||||
}
|
||||
if (!STATUSES.has(json.error)) {
|
||||
throw new TypeError("Not of WebDriverError descent: " + json.error);
|
||||
}
|
||||
|
||||
this.InsecureCertificateError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InsecureCertificateError";
|
||||
this.status = "insecure certificate";
|
||||
};
|
||||
InsecureCertificateError.prototype = Object.create(WebDriverError.prototype);
|
||||
let cls = STATUSES.get(json.error);
|
||||
let err = new cls();
|
||||
if ("message" in json) {
|
||||
err.message = json.message;
|
||||
}
|
||||
if ("stacktrace" in json) {
|
||||
err.stack = json.stacktrace;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
this.InvalidArgumentError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InvalidArgumentError";
|
||||
this.status = "invalid argument";
|
||||
};
|
||||
InvalidArgumentError.prototype = Object.create(WebDriverError.prototype);
|
||||
class ElementNotAccessibleError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "element not accessible";
|
||||
}
|
||||
}
|
||||
|
||||
this.InvalidElementStateError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InvalidElementStateError";
|
||||
this.status = "invalid element state";
|
||||
};
|
||||
InvalidElementStateError.prototype = Object.create(WebDriverError.prototype);
|
||||
class ElementNotVisibleError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "element not visible";
|
||||
}
|
||||
}
|
||||
|
||||
this.InvalidSelectorError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InvalidSelectorError";
|
||||
this.status = "invalid selector";
|
||||
};
|
||||
InvalidSelectorError.prototype = Object.create(WebDriverError.prototype);
|
||||
class InsecureCertificateError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "insecure certificate";
|
||||
}
|
||||
}
|
||||
|
||||
this.InvalidSessionIdError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "InvalidSessionIdError";
|
||||
this.status = "invalid session id";
|
||||
};
|
||||
InvalidSessionIdError.prototype = Object.create(WebDriverError.prototype);
|
||||
class InvalidArgumentError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "invalid argument";
|
||||
}
|
||||
}
|
||||
|
||||
class InvalidElementStateError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "invalid element state";
|
||||
}
|
||||
}
|
||||
|
||||
class InvalidSelectorError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "invalid selector";
|
||||
}
|
||||
}
|
||||
|
||||
class InvalidSessionIDError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "invalid session id";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an error message for a JavaScript error thrown during
|
||||
* executeScript or executeAsyncScript.
|
||||
*
|
||||
* @param {Error} err
|
||||
* An Error object passed to a catch block or a message.
|
||||
* @param {string=} fnName
|
||||
* The name of the function to use in the stack trace message
|
||||
* (e.g. execute_script).
|
||||
* @param {string=} file
|
||||
* The filename of the test file containing the Marionette
|
||||
* command that caused this error to occur.
|
||||
* @param {number=} line
|
||||
* The line number of the above test file.
|
||||
* @param {string=} script
|
||||
* The JS script being executed in text form.
|
||||
* Creates a richly annotated error for an error situation that occurred
|
||||
* whilst evaluating injected scripts.
|
||||
*/
|
||||
this.JavaScriptError = function (
|
||||
err, fnName = null, file = null, line = null, script = null) {
|
||||
let msg = String(err);
|
||||
let trace = "";
|
||||
class JavaScriptError extends WebDriverError {
|
||||
/**
|
||||
* @param {(string|Error)} x
|
||||
* An Error object instance or a string describing the error
|
||||
* situation.
|
||||
* @param {string=} fnName
|
||||
* Name of the function to use in the stack trace message.
|
||||
* @param {string=} file
|
||||
* Filename of the test file on the client.
|
||||
* @param {number=} line
|
||||
* Line number of |file|.
|
||||
* @param {string=} script
|
||||
* Script being executed, in text form.
|
||||
*/
|
||||
constructor (
|
||||
x,
|
||||
fnName = undefined,
|
||||
file = undefined,
|
||||
line = undefined,
|
||||
script = undefined) {
|
||||
let msg = String(x);
|
||||
let trace = "";
|
||||
|
||||
if (fnName) {
|
||||
trace += fnName;
|
||||
if (file) {
|
||||
trace += ` @${file}`;
|
||||
if (line) {
|
||||
trace += `, line ${line}`;
|
||||
if (fnName) {
|
||||
trace += fnName;
|
||||
if (file) {
|
||||
trace += ` @${file}`;
|
||||
if (line) {
|
||||
trace += `, line ${line}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof err == "object" && "name" in err && "stack" in err) {
|
||||
let jsStack = err.stack.split("\n");
|
||||
let match = jsStack[0].match(/:(\d+):\d+$/);
|
||||
let jsLine = match ? parseInt(match[1]) : 0;
|
||||
if (script) {
|
||||
let src = script.split("\n")[jsLine];
|
||||
trace += "\n" +
|
||||
"inline javascript, line " + jsLine + "\n" +
|
||||
"src: \"" + src + "\"";
|
||||
if (error.isError(x)) {
|
||||
let jsStack = x.stack.split("\n");
|
||||
let match = jsStack[0].match(/:(\d+):\d+$/);
|
||||
let jsLine = match ? parseInt(match[1]) : 0;
|
||||
if (script) {
|
||||
let src = script.split("\n")[jsLine];
|
||||
trace += "\n" +
|
||||
`inline javascript, line ${jsLine}\n` +
|
||||
`src: "${src}"`;
|
||||
}
|
||||
trace += "\nStack:\n" + x.stack;
|
||||
}
|
||||
trace += "\nStack:\n" + String(err.stack);
|
||||
|
||||
super(msg);
|
||||
this.status = "javascript error";
|
||||
this.stack = trace;
|
||||
}
|
||||
}
|
||||
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "JavaScriptError";
|
||||
this.status = "javascript error";
|
||||
this.stack = trace;
|
||||
};
|
||||
JavaScriptError.prototype = Object.create(WebDriverError.prototype);
|
||||
class NoAlertOpenError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "no such alert";
|
||||
}
|
||||
}
|
||||
|
||||
this.NoAlertOpenError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "NoAlertOpenError";
|
||||
this.status = "no such alert";
|
||||
};
|
||||
NoAlertOpenError.prototype = Object.create(WebDriverError.prototype);
|
||||
class NoSuchElementError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "no such element";
|
||||
}
|
||||
}
|
||||
|
||||
this.NoSuchElementError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "NoSuchElementError";
|
||||
this.status = "no such element";
|
||||
};
|
||||
NoSuchElementError.prototype = Object.create(WebDriverError.prototype);
|
||||
class NoSuchFrameError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "no such frame";
|
||||
}
|
||||
}
|
||||
|
||||
this.NoSuchFrameError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "NoSuchFrameError";
|
||||
this.status = "no such frame";
|
||||
};
|
||||
NoSuchFrameError.prototype = Object.create(WebDriverError.prototype);
|
||||
class NoSuchWindowError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "no such window";
|
||||
}
|
||||
}
|
||||
|
||||
this.NoSuchWindowError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "NoSuchWindowError";
|
||||
this.status = "no such window";
|
||||
};
|
||||
NoSuchWindowError.prototype = Object.create(WebDriverError.prototype);
|
||||
class ScriptTimeoutError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "script timeout";
|
||||
}
|
||||
}
|
||||
|
||||
this.ScriptTimeoutError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "ScriptTimeoutError";
|
||||
this.status = "script timeout";
|
||||
};
|
||||
ScriptTimeoutError.prototype = Object.create(WebDriverError.prototype);
|
||||
class SessionNotCreatedError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "session not created";
|
||||
}
|
||||
}
|
||||
|
||||
this.SessionNotCreatedError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "SessionNotCreatedError";
|
||||
this.status = "session not created";
|
||||
};
|
||||
SessionNotCreatedError.prototype = Object.create(WebDriverError.prototype);
|
||||
class StaleElementReferenceError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "stale element reference";
|
||||
}
|
||||
}
|
||||
|
||||
this.StaleElementReferenceError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "StaleElementReferenceError";
|
||||
this.status = "stale element reference";
|
||||
};
|
||||
StaleElementReferenceError.prototype = Object.create(WebDriverError.prototype);
|
||||
class TimeoutError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "timeout";
|
||||
}
|
||||
}
|
||||
|
||||
this.TimeoutError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "TimeoutError";
|
||||
this.status = "timeout";
|
||||
};
|
||||
TimeoutError.prototype = Object.create(WebDriverError.prototype);
|
||||
class UnableToSetCookieError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "unable to set cookie";
|
||||
}
|
||||
}
|
||||
|
||||
this.UnableToSetCookieError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "UnableToSetCookieError";
|
||||
this.status = "unable to set cookie";
|
||||
};
|
||||
UnableToSetCookieError.prototype = Object.create(WebDriverError.prototype);
|
||||
class UnknownCommandError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "unknown command";
|
||||
}
|
||||
}
|
||||
|
||||
this.UnknownCommandError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "UnknownCommandError";
|
||||
this.status = "unknown command";
|
||||
};
|
||||
UnknownCommandError.prototype = Object.create(WebDriverError.prototype);
|
||||
class UnknownError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "unknown error";
|
||||
}
|
||||
}
|
||||
|
||||
this.UnknownError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "UnknownError";
|
||||
this.status = "unknown error";
|
||||
};
|
||||
UnknownError.prototype = Object.create(WebDriverError.prototype);
|
||||
class UnsupportedOperationError extends WebDriverError {
|
||||
constructor (message) {
|
||||
super(message);
|
||||
this.status = "unsupported operation";
|
||||
}
|
||||
}
|
||||
|
||||
this.UnsupportedOperationError = function (msg) {
|
||||
WebDriverError.call(this, msg);
|
||||
this.name = "UnsupportedOperationError";
|
||||
this.status = "unsupported operation";
|
||||
};
|
||||
UnsupportedOperationError.prototype = Object.create(WebDriverError.prototype);
|
||||
|
||||
const nameLookup = new Map();
|
||||
const statusLookup = new Map();
|
||||
for (let s of ERRORS) {
|
||||
let cls = this[s];
|
||||
let inst = new cls();
|
||||
nameLookup.set(inst.name, cls);
|
||||
statusLookup.set(inst.status, cls);
|
||||
};
|
||||
const STATUSES = new Map([
|
||||
["element not accessible", ElementNotAccessibleError],
|
||||
["element not visible", ElementNotVisibleError],
|
||||
["insecure certificate", InsecureCertificateError],
|
||||
["invalid argument", InvalidArgumentError],
|
||||
["invalid element state", InvalidElementStateError],
|
||||
["invalid selector", InvalidSelectorError],
|
||||
["invalid session id", InvalidSessionIDError],
|
||||
["javascript error", JavaScriptError],
|
||||
["no alert open", NoAlertOpenError],
|
||||
["no such element", NoSuchElementError],
|
||||
["no such frame", NoSuchFrameError],
|
||||
["no such window", NoSuchWindowError],
|
||||
["script timeout", ScriptTimeoutError],
|
||||
["session not created", SessionNotCreatedError],
|
||||
["stale element reference", StaleElementReferenceError],
|
||||
["timeout", TimeoutError],
|
||||
["unable to set cookie", UnableToSetCookieError],
|
||||
["unknown command", UnknownCommandError],
|
||||
["unknown error", UnknownError],
|
||||
["unsupported operation", UnsupportedOperationError],
|
||||
["webdriver error", WebDriverError],
|
||||
]);
|
||||
|
@ -254,15 +254,12 @@ this.Response = class {
|
||||
* propagated.
|
||||
*/
|
||||
sendError(err) {
|
||||
let wd = error.isWebDriverError(err);
|
||||
let we = wd ? err : new WebDriverError(err.message);
|
||||
|
||||
this.error = error.toJson(we);
|
||||
this.error = error.wrap(err).toJSON();
|
||||
this.body = null;
|
||||
this.send();
|
||||
|
||||
// propagate errors that are implementation problems
|
||||
if (!wd) {
|
||||
// propagate errors which are implementation problems
|
||||
if (!error.isWebDriverError(err)) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ proxy.AsyncMessageChannel = class {
|
||||
break;
|
||||
|
||||
case proxy.AsyncMessageChannel.ReplyType.Error:
|
||||
let err = error.fromJson(msg.json.data);
|
||||
let err = WebDriverError.fromJSON(msg.json.data);
|
||||
reject(err);
|
||||
break;
|
||||
|
||||
@ -172,16 +172,24 @@ proxy.AsyncMessageChannel = class {
|
||||
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Ok);
|
||||
} else if (error.isError(obj)) {
|
||||
let err = error.wrap(obj);
|
||||
let serr = error.toJson(err);
|
||||
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Error, serr);
|
||||
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Error, err);
|
||||
} else {
|
||||
this.sendReply_(uuid, proxy.AsyncMessageChannel.ReplyType.Value, obj);
|
||||
}
|
||||
}
|
||||
|
||||
sendReply_(uuid, type, data = undefined) {
|
||||
let path = proxy.AsyncMessageChannel.makePath(uuid);
|
||||
let msg = {type: type, data: data};
|
||||
const path = proxy.AsyncMessageChannel.makePath(uuid);
|
||||
|
||||
let payload;
|
||||
if (data && typeof data.toJSON == "function") {
|
||||
payload = data.toJSON();
|
||||
} else {
|
||||
payload = data;
|
||||
}
|
||||
|
||||
const msg = {type: type, data: payload};
|
||||
|
||||
// here sendAsync is actually the content frame's
|
||||
// sendAsyncMessage(path, message) global
|
||||
this.sendAsync(path, msg);
|
||||
|
@ -12,7 +12,7 @@ Cu.import("chrome://marionette/content/error.js");
|
||||
add_test(function test_session() {
|
||||
assert.session({sessionId: "foo"});
|
||||
for (let typ of [null, undefined, ""]) {
|
||||
Assert.throws(() => assert.session({sessionId: typ}), InvalidSessionIdError);
|
||||
Assert.throws(() => assert.session({sessionId: typ}), InvalidSessionIDError);
|
||||
}
|
||||
|
||||
run_next_test();
|
||||
|
@ -43,14 +43,22 @@ add_test(function test_isWebDriverError() {
|
||||
|
||||
ok(error.isWebDriverError(new WebDriverError()));
|
||||
ok(error.isWebDriverError(new InvalidArgumentError()));
|
||||
ok(error.isWebDriverError(new JavaScriptError()));
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_wrap() {
|
||||
// webdriver-derived errors should not be wrapped
|
||||
equal(error.wrap(new WebDriverError()).name, "WebDriverError");
|
||||
ok(error.wrap(new WebDriverError()) instanceof WebDriverError);
|
||||
equal(error.wrap(new InvalidArgumentError()).name, "InvalidArgumentError");
|
||||
ok(error.wrap(new InvalidArgumentError()) instanceof WebDriverError);
|
||||
ok(error.wrap(new InvalidArgumentError()) instanceof InvalidArgumentError);
|
||||
|
||||
// JS errors should be wrapped in WebDriverError
|
||||
equal(error.wrap(new Error()).name, "WebDriverError");
|
||||
ok(error.wrap(new Error()) instanceof WebDriverError);
|
||||
equal(error.wrap(new EvalError()).name, "WebDriverError");
|
||||
equal(error.wrap(new InternalError()).name, "WebDriverError");
|
||||
equal(error.wrap(new RangeError()).name, "WebDriverError");
|
||||
@ -59,6 +67,11 @@ add_test(function test_wrap() {
|
||||
equal(error.wrap(new TypeError()).name, "WebDriverError");
|
||||
equal(error.wrap(new URIError()).name, "WebDriverError");
|
||||
|
||||
// wrapped JS errors should retain their type
|
||||
// as part of the message field
|
||||
equal(error.wrap(new WebDriverError("foo")).message, "foo");
|
||||
equal(error.wrap(new TypeError("foo")).message, "TypeError: foo");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
@ -76,23 +89,20 @@ add_test(function test_stringify() {
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_toJson() {
|
||||
Assert.throws(() => error.toJson(new Error()),
|
||||
/Unserialisable error type: [object Error]/);
|
||||
|
||||
add_test(function test_toJSON() {
|
||||
let e0 = new WebDriverError();
|
||||
let e0s = error.toJson(e0);
|
||||
let e0s = e0.toJSON();
|
||||
equal(e0s.error, "webdriver error");
|
||||
equal(e0s.message, "");
|
||||
equal(e0s.stacktrace, e0.stack);
|
||||
|
||||
let e1 = new WebDriverError("a");
|
||||
let e1s = error.toJson(e1);
|
||||
let e1s = e1.toJSON();
|
||||
equal(e1s.message, e1.message);
|
||||
equal(e1s.stacktrace, e1.stack);
|
||||
|
||||
let e2 = new JavaScriptError("first", "second", "third", "fourth");
|
||||
let e2s = error.toJson(e2);
|
||||
let e2s = e2.toJSON();
|
||||
equal(e2.status, e2s.error);
|
||||
equal(e2.message, e2s.message);
|
||||
ok(e2s.stacktrace.match(/second/));
|
||||
@ -102,29 +112,47 @@ add_test(function test_toJson() {
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_fromJson() {
|
||||
Assert.throws(() => error.fromJson({error: "foo"}),
|
||||
/Undeserialisable error type: foo/);
|
||||
Assert.throws(() => error.fromJson({error: "Error"}),
|
||||
/Undeserialisable error type: Error/);
|
||||
Assert.throws(() => error.fromJson({}),
|
||||
/Undeserialisable error type: undefined/);
|
||||
add_test(function test_fromJSON() {
|
||||
Assert.throws(() => WebDriverError.fromJSON({error: "foo"}),
|
||||
/Not of WebDriverError descent/);
|
||||
Assert.throws(() => WebDriverError.fromJSON({error: "Error"}),
|
||||
/Not of WebDriverError descent/);
|
||||
Assert.throws(() => WebDriverError.fromJSON({}),
|
||||
/Undeserialisable error type/);
|
||||
Assert.throws(() => WebDriverError.fromJSON(undefined),
|
||||
/TypeError/);
|
||||
|
||||
// stacks will be different
|
||||
let e1 = new WebDriverError("1");
|
||||
let e1r = error.fromJson({error: "webdriver error", message: "1"});
|
||||
let e1r = WebDriverError.fromJSON({error: "webdriver error", message: "1"});
|
||||
ok(e1r instanceof WebDriverError);
|
||||
equal(e1r.name, e1.name);
|
||||
equal(e1r.status, e1.status);
|
||||
equal(e1r.message, e1.message);
|
||||
|
||||
// stacks will be different
|
||||
let e2 = new InvalidArgumentError("2");
|
||||
let e2r = error.fromJson({error: "invalid argument", message: "2"});
|
||||
let e2r = WebDriverError.fromJSON({error: "invalid argument", message: "2"});
|
||||
ok(e2r instanceof WebDriverError);
|
||||
ok(e2r instanceof InvalidArgumentError);
|
||||
equal(e2r.name, e2.name);
|
||||
equal(e2r.status, e2.status);
|
||||
equal(e2r.message, e2.message);
|
||||
|
||||
let e3 = new JavaScriptError("first", "second", "third", "fourth");
|
||||
let e3s = error.toJson(e3);
|
||||
deepEqual(e3, error.fromJson(e3s));
|
||||
// test stacks
|
||||
let e3j = {error: "no such element", message: "3", stacktrace: "4"};
|
||||
let e3r = WebDriverError.fromJSON(e3j);
|
||||
ok(e3r instanceof WebDriverError);
|
||||
ok(e3r instanceof NoSuchElementError);
|
||||
equal(e3r.name, "NoSuchElementError");
|
||||
equal(e3r.status, e3j.error);
|
||||
equal(e3r.message, e3j.message);
|
||||
equal(e3r.stack, e3j.stacktrace);
|
||||
|
||||
// parity with toJSON
|
||||
let e4 = new JavaScriptError("first", "second", "third", "fourth");
|
||||
let e4s = e4.toJSON();
|
||||
deepEqual(e4, WebDriverError.fromJSON(e4s));
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -134,7 +162,7 @@ add_test(function test_WebDriverError() {
|
||||
equal("WebDriverError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("webdriver error", err.status);
|
||||
equal(Error.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -144,7 +172,7 @@ add_test(function test_ElementNotAccessibleError() {
|
||||
equal("ElementNotAccessibleError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("element not accessible", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -154,7 +182,7 @@ add_test(function test_ElementNotVisibleError() {
|
||||
equal("ElementNotVisibleError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("element not visible", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -164,7 +192,7 @@ add_test(function test_InvalidArgumentError() {
|
||||
equal("InvalidArgumentError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("invalid argument", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -174,7 +202,7 @@ add_test(function test_InvalidElementStateError() {
|
||||
equal("InvalidElementStateError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("invalid element state", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -184,17 +212,17 @@ add_test(function test_InvalidSelectorError() {
|
||||
equal("InvalidSelectorError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("invalid selector", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
add_test(function test_InvalidSessionIdError() {
|
||||
let err = new InvalidSessionIdError("foo");
|
||||
equal("InvalidSessionIdError", err.name);
|
||||
add_test(function test_InvalidSessionIDError() {
|
||||
let err = new InvalidSessionIDError("foo");
|
||||
equal("InvalidSessionIDError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("invalid session id", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -204,7 +232,7 @@ add_test(function test_JavaScriptError() {
|
||||
equal("JavaScriptError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("javascript error", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
equal("undefined", new JavaScriptError(undefined).message);
|
||||
// TODO(ato): Bug 1240550
|
||||
@ -222,7 +250,7 @@ add_test(function test_NoAlertOpenError() {
|
||||
equal("NoAlertOpenError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("no such alert", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -232,7 +260,7 @@ add_test(function test_NoSuchElementError() {
|
||||
equal("NoSuchElementError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("no such element", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -242,7 +270,7 @@ add_test(function test_NoSuchFrameError() {
|
||||
equal("NoSuchFrameError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("no such frame", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -252,7 +280,7 @@ add_test(function test_NoSuchWindowError() {
|
||||
equal("NoSuchWindowError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("no such window", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -262,7 +290,7 @@ add_test(function test_ScriptTimeoutError() {
|
||||
equal("ScriptTimeoutError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("script timeout", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -272,7 +300,7 @@ add_test(function test_SessionNotCreatedError() {
|
||||
equal("SessionNotCreatedError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("session not created", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -282,7 +310,7 @@ add_test(function test_StaleElementReferenceError() {
|
||||
equal("StaleElementReferenceError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("stale element reference", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -292,7 +320,7 @@ add_test(function test_TimeoutError() {
|
||||
equal("TimeoutError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("timeout", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -302,7 +330,7 @@ add_test(function test_UnableToSetCookieError() {
|
||||
equal("UnableToSetCookieError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("unable to set cookie", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -312,7 +340,7 @@ add_test(function test_UnknownCommandError() {
|
||||
equal("UnknownCommandError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("unknown command", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -322,7 +350,7 @@ add_test(function test_UnknownError() {
|
||||
equal("UnknownError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("unknown error", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -332,7 +360,7 @@ add_test(function test_UnsupportedOperationError() {
|
||||
equal("UnsupportedOperationError", err.name);
|
||||
equal("foo", err.message);
|
||||
equal("unsupported operation", err.status);
|
||||
equal(WebDriverError.prototype.toString(), Object.getPrototypeOf(err).toString());
|
||||
ok(err instanceof WebDriverError);
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
@ -143,7 +143,7 @@ add_test(function test_Response_send() {
|
||||
add_test(function test_Response_sendError() {
|
||||
let err = new WebDriverError();
|
||||
let resp = new Response(42, r => {
|
||||
equal(error.toJson(err).error, r.error.error);
|
||||
equal(err.toJSON().error, r.error.error);
|
||||
equal(null, r.body);
|
||||
equal(false, r.sent);
|
||||
});
|
||||
|
@ -80,6 +80,15 @@ except ImportError:
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
NO_TESTS_FOUND = """
|
||||
No tests were found for flavor '{}' and the following manifest filters:
|
||||
{}
|
||||
|
||||
Make sure the test paths (if any) are spelt correctly and the corresponding
|
||||
--flavor and --subsuite are being used. See `mach mochitest --help` for a
|
||||
list of valid flavors.
|
||||
""".lstrip()
|
||||
|
||||
|
||||
########################################
|
||||
# Option for MOZ (former NSPR) logging #
|
||||
@ -1372,9 +1381,7 @@ toolbar#nav-bar {
|
||||
exists=False, disabled=disabled, filters=filters, **info)
|
||||
|
||||
if len(tests) == 0:
|
||||
self.log.error("no tests to run using specified "
|
||||
"combination of filters: {}".format(
|
||||
manifest.fmt_filters()))
|
||||
self.log.error(NO_TESTS_FOUND.format(options.flavor, manifest.fmt_filters()))
|
||||
|
||||
paths = []
|
||||
|
||||
|
@ -298,6 +298,7 @@ class FirefoxMediaTestsBase(TestingMixin, VCSToolsScript):
|
||||
env = self.query_env()
|
||||
if self.query_minidump_stackwalk():
|
||||
env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
|
||||
if self.config['allow_software_gl_layers']:
|
||||
env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
|
||||
|
@ -241,6 +241,7 @@ class FirefoxUITests(TestingMixin, VCSToolsScript):
|
||||
env.update({'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']})
|
||||
if self.query_minidump_stackwalk():
|
||||
env.update({'MINIDUMP_STACKWALK': self.minidump_stackwalk_path})
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
|
||||
if self.config['allow_software_gl_layers']:
|
||||
env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
|
||||
|
@ -437,6 +437,7 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin):
|
||||
if not self.run_local:
|
||||
env['MINIDUMP_STACKWALK'] = self.query_minidump_stackwalk()
|
||||
env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
|
||||
self.mkdir_p(env['MOZ_UPLOAD_DIR'])
|
||||
env = self.query_env(partial_env=env, log_level=INFO)
|
||||
|
@ -761,6 +761,7 @@ class AndroidEmulatorTest(BlobUploadMixin, TestingMixin, EmulatorMixin, VCSMixin
|
||||
env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
|
||||
env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
|
||||
self.info("Running on %s the command %s" % (self.emulator["name"], subprocess.list2cmdline(cmd)))
|
||||
self.info("##### %s log begins" % self.test_suite)
|
||||
|
@ -697,6 +697,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
|
||||
env['MOZ_NODE_PATH'] = self.nodejs_path
|
||||
env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
if not os.path.isdir(env['MOZ_UPLOAD_DIR']):
|
||||
self.mkdir_p(env['MOZ_UPLOAD_DIR'])
|
||||
|
||||
|
@ -307,6 +307,7 @@ class MarionetteTest(TestingMixin, MercurialScript, BlobUploadMixin, TransferMix
|
||||
env['MINIDUMP_STACKWALK'] = self.minidump_stackwalk_path
|
||||
env['MOZ_UPLOAD_DIR'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['MINIDUMP_SAVE_PATH'] = self.query_abs_dirs()['abs_blob_upload_dir']
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
|
||||
if self.config['allow_software_gl_layers']:
|
||||
env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
|
||||
|
@ -240,6 +240,7 @@ class WebPlatformTest(TestingMixin, MercurialScript, BlobUploadMixin, CodeCovera
|
||||
log_compact=True)
|
||||
|
||||
env = {'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']}
|
||||
env['RUST_BACKTRACE'] = '1'
|
||||
|
||||
if self.config['allow_software_gl_layers']:
|
||||
env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
|
||||
|
@ -158,6 +158,8 @@ def normalize_test_path(test_root, path):
|
||||
test_path = os.path.join(parent, path)
|
||||
if os.path.exists(test_path):
|
||||
return os.path.normpath(os.path.abspath(test_path))
|
||||
# Not a valid path? Return as is and let test harness deal with it
|
||||
return path
|
||||
|
||||
|
||||
def bootstrap(test_package_root):
|
||||
|
@ -228,12 +228,6 @@
|
||||
[hsla(calc(050 + 050), 100%, 100%, 001) (SVG)]
|
||||
expected: FAIL
|
||||
|
||||
[rgb(/**/255, 255, 255) (SVG)]
|
||||
expected: FAIL
|
||||
|
||||
[rgb(/**/255/**/, /**/255/**/, /**/255/**/) (SVG)]
|
||||
expected: FAIL
|
||||
|
||||
[rgb(calc(/**/100/**/ + /**/155/**/), 255, 255) (quirks)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -76,7 +76,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Nested unknown domains",
|
||||
@ -84,28 +85,32 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Allowed domain",
|
||||
domains: ["http://flashallow.example.com"],
|
||||
expectedActivated: true,
|
||||
expectedHasRunningPlugin: true,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "allowed"
|
||||
},
|
||||
{
|
||||
name: "Allowed nested domain",
|
||||
domains: ["http://example.com", "http://flashallow.example.com"],
|
||||
expectedActivated: true,
|
||||
expectedHasRunningPlugin: true,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "allowed"
|
||||
},
|
||||
{
|
||||
name: "Subdocument of allowed domain",
|
||||
domains: ["http://flashallow.example.com", "http://example.com"],
|
||||
expectedActivated: true,
|
||||
expectedHasRunningPlugin: true,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "allowed"
|
||||
},
|
||||
{
|
||||
name: "Exception to allowed domain",
|
||||
@ -113,7 +118,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Blocked domain",
|
||||
@ -121,7 +127,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Nested blocked domain",
|
||||
@ -129,7 +136,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Subdocument of blocked subdocument",
|
||||
@ -137,7 +145,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Blocked subdocument nested among in allowed documents",
|
||||
@ -145,7 +154,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Exception to blocked domain",
|
||||
@ -153,7 +163,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Sub-document blocked domain in top-level context",
|
||||
@ -161,7 +172,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Sub-document blocked domain",
|
||||
@ -169,7 +181,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Sub-document blocked subdocument of an allowed domain",
|
||||
@ -177,7 +190,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Subdocument of Sub-document blocked domain",
|
||||
@ -185,7 +199,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_USER_DISABLED,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: false
|
||||
pluginListed: false,
|
||||
expectedFlashClassification: "denied"
|
||||
},
|
||||
{
|
||||
name: "Sub-document exception in top-level context",
|
||||
@ -193,7 +208,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
},
|
||||
{
|
||||
name: "Sub-document blocked domain exception",
|
||||
@ -201,7 +217,8 @@ var testCases = [
|
||||
expectedPluginFallbackType: Ci.nsIObjectLoadingContent.PLUGIN_CLICK_TO_PLAY,
|
||||
expectedActivated: false,
|
||||
expectedHasRunningPlugin: false,
|
||||
pluginListed: true
|
||||
pluginListed: true,
|
||||
expectedFlashClassification: "unknown"
|
||||
}
|
||||
];
|
||||
|
||||
@ -249,7 +266,8 @@ function getPluginInfo(browser, depth) {
|
||||
pluginFallbackType: pluginObj.pluginFallbackType,
|
||||
activated: pluginObj.activated,
|
||||
hasRunningPlugin: pluginObj.hasRunningPlugin,
|
||||
listed: ("Shockwave Flash" in win.navigator.plugins)
|
||||
listed: ("Shockwave Flash" in win.navigator.plugins),
|
||||
flashClassification: doc.documentFlashClassification
|
||||
};
|
||||
});
|
||||
}
|
||||
@ -288,6 +306,10 @@ add_task(function* checkFlashBlockLists() {
|
||||
is(pluginInfo.listed, testCase.pluginListed,
|
||||
"Plugin's existance in navigator.plugins should match expected")
|
||||
}
|
||||
if ("expectedFlashClassification" in testCase) {
|
||||
is(pluginInfo.flashClassification, testCase.expectedFlashClassification,
|
||||
"Page's classification should match expected");
|
||||
}
|
||||
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
@ -316,6 +338,8 @@ add_task(function* checkFlashBlockDisabled() {
|
||||
ok(pluginInfo.activated, "Plugin should be activated");
|
||||
ok(pluginInfo.hasRunningPlugin, "Plugin should be running");
|
||||
ok(pluginInfo.listed, "Flash should be listed in navigator.plugins");
|
||||
is(pluginInfo.flashClassification, "allowed",
|
||||
"Page's classification should be 'allowed'");
|
||||
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user