зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1291971 - Part 6, enable receiver idlharness test. r=smaug.
MozReview-Commit-ID: BDZ8daA2gpj --HG-- extra : rebase_source : 70595ad9e8e56856c464fa12c2c2eeadc9e48063
This commit is contained in:
Родитель
6307881f75
Коммит
2e3eadd9df
|
@ -9341,6 +9341,31 @@ nsContentUtils::GetPresentationURL(nsIDocShell* aDocShell, nsAString& aPresentat
|
|||
{
|
||||
MOZ_ASSERT(aDocShell);
|
||||
|
||||
// Simulate receiver context for web platform test
|
||||
if (Preferences::GetBool("dom.presentation.testing.simulate-receiver")) {
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> docShellWin =
|
||||
do_QueryInterface(aDocShell->GetScriptGlobalObject());
|
||||
if (docShellWin) {
|
||||
doc = docShellWin->GetExtantDoc();
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(!doc)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri = doc->GetDocumentURI();
|
||||
if (NS_WARN_IF(!uri)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoCString uriStr;
|
||||
uri->GetSpec(uriStr);
|
||||
aPresentationUrl = NS_ConvertUTF8toUTF16(uriStr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
|
||||
aDocShell->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
|
||||
|
|
|
@ -62,7 +62,8 @@ Presentation::HasReceiverSupport(JSContext* aCx, JSObject* aGlobal)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!docshell->GetIsInMozBrowserOrApp()) {
|
||||
if (!Preferences::GetBool("dom.presentation.testing.simulate-receiver") &&
|
||||
!docshell->GetIsInMozBrowserOrApp()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(PresentationReceiver)
|
|||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PresentationReceiver)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
NS_INTERFACE_MAP_ENTRY(nsIPresentationRespondingListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
/* static */ already_AddRefed<PresentationReceiver>
|
||||
|
|
|
@ -236,6 +236,7 @@ user_pref("browser.webapps.checkForUpdates", 0);
|
|||
user_pref("dom.presentation.tcp_server.debug", true);
|
||||
// Enable debug logging in the presentation core service.
|
||||
user_pref("logging.Presentation", "debug");
|
||||
user_pref("dom.presentation.testing.simulate-receiver", false);
|
||||
|
||||
// Don't connect to Yahoo! for RSS feed tests.
|
||||
// en-US only uses .types.0.uri, but set all of them just to be sure.
|
||||
|
|
|
@ -1,194 +1,8 @@
|
|||
[idlharness.html]
|
||||
type: testharness
|
||||
[Navigator interface: attribute presentation]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface: attribute receiver]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation must be primary interface of navigator.presentation]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of navigator.presentation]
|
||||
expected: FAIL
|
||||
|
||||
[Presentation interface: navigator.presentation must inherit property "receiver" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionAvailableEvent interface: attribute connection]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute id]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute state]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation close()]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation terminate()]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute onconnect]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute onclose]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute onterminate]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute binaryType]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: attribute onmessage]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation send(DOMString)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation send(Blob)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation send(ArrayBuffer)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnection interface: operation send(ArrayBufferView)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface: attribute reason]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionClosedEvent interface: attribute message]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver interface: attribute connectionList]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationReceiver must be primary interface of navigator.presentation.receiver]
|
||||
expected: FAIL
|
||||
|
||||
[Stringification of navigator.presentation.receiver]
|
||||
expected: FAIL
|
||||
|
||||
prefs: [dom.presentation.enabled: true,
|
||||
dom.presentation.receiver.enabled: true,
|
||||
dom.presentation.testing.simulate-receiver: true,
|
||||
dom.presentation.device.name: "Firefox"]
|
||||
[PresentationReceiver interface: navigator.presentation.receiver must inherit property "connectionList" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface: attribute connections]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionList interface: attribute onconnectionavailable]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface object length]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface object name]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface: existence and properties of interface prototype object's "constructor" property]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface: attribute reason]
|
||||
expected: FAIL
|
||||
|
||||
[PresentationConnectionCloseEvent interface: attribute message]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче