зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 6c89df01905f (bug 893501) for Android mochitest-7 orange.
This commit is contained in:
Родитель
93dfb0d942
Коммит
5457dd1ce5
|
@ -46,14 +46,10 @@ public:
|
|||
|
||||
DesktopNotificationCenter(nsPIDOMWindow *aWindow)
|
||||
{
|
||||
MOZ_ASSERT(aWindow);
|
||||
mOwner = aWindow;
|
||||
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aWindow);
|
||||
MOZ_ASSERT(sop);
|
||||
|
||||
mPrincipal = sop->GetPrincipal();
|
||||
MOZ_ASSERT(mPrincipal);
|
||||
// Grab the uri of the document
|
||||
mPrincipal = mOwner->GetDoc()->NodePrincipal();
|
||||
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ MOCHITEST_FILES = \
|
|||
test_leak_windowClose.html \
|
||||
create_notification.html \
|
||||
notification_common.js \
|
||||
test_bug893501.html \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>bug893501 - crash test</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="notification_common.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="foo"></div>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript"><!--
|
||||
if (is_feature_enabled()) {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function showNotifications() {
|
||||
ok(navigator.mozNotification, "test for notification.");
|
||||
|
||||
var div = document.getElementById('foo');
|
||||
var frame = document.createElement('iframe');
|
||||
div.appendChild(frame);
|
||||
|
||||
var frameNavigator = frame.contentWindow.navigator;
|
||||
frame.addEventListener("load", n, false);
|
||||
frame.src = "data:text/html,hello world";
|
||||
|
||||
function n()
|
||||
{
|
||||
ok(frameNavigator.mozNotification, "Still alive!");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
setup_notifications(true, false, showNotifications);
|
||||
} else {
|
||||
ok(true, "Desktop notifications not enabled.");
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
Загрузка…
Ссылка в новой задаче