mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-13 07:24:47 +00:00
Bug 736058, support createEvent('StorageEvent'), r=sicking
--HG-- extra : rebase_source : f46854524cc27273799d26f662fe5335f32aaeff
This commit is contained in:
parent
adef1935c5
commit
43f76b98c8
@ -113,6 +113,7 @@ LOCAL_INCLUDES += \
|
||||
-I$(srcdir)/../../xul/content/src \
|
||||
-I$(srcdir)/../../xml/content/src \
|
||||
-I$(srcdir)/../../../dom/base \
|
||||
-I$(srcdir)/../../../dom/src/storage \
|
||||
-I$(srcdir)/../../../layout/generic \
|
||||
-I$(srcdir)/../../../layout/xul/base/src \
|
||||
-I$(srcdir)/../../../layout/xul/base/src/tree/src \
|
||||
|
@ -53,6 +53,7 @@
|
||||
#include "nsDOMHashChangeEvent.h"
|
||||
#include "nsFrameLoader.h"
|
||||
#include "nsDOMTouchEvent.h"
|
||||
#include "nsDOMStorage.h"
|
||||
|
||||
#define NS_TARGET_CHAIN_FORCE_CONTENT_DISPATCH (1 << 0)
|
||||
#define NS_TARGET_CHAIN_WANTS_WILL_HANDLE_EVENT (1 << 1)
|
||||
@ -913,6 +914,11 @@ nsEventDispatcher::CreateEvent(nsPresContext* aPresContext,
|
||||
return NS_NewDOMCustomEvent(aDOMEvent, aPresContext, nsnull);
|
||||
if (aEventType.LowerCaseEqualsLiteral("mozsmsevent"))
|
||||
return NS_NewDOMSmsEvent(aDOMEvent, aPresContext, nsnull);
|
||||
if (aEventType.LowerCaseEqualsLiteral("storageevent")) {
|
||||
NS_ADDREF(*aDOMEvent = static_cast<nsDOMEvent*>(new nsDOMStorageEvent()));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
|
||||
}
|
||||
|
@ -328,6 +328,9 @@ is(receivedEvent, e, "Wrong event!");
|
||||
|
||||
// StorageEvent
|
||||
|
||||
e = document.createEvent("StorageEvent");
|
||||
ok(e, "Should have created an event!");
|
||||
|
||||
try {
|
||||
e = new StorageEvent();
|
||||
} catch(exp) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user