зеркало из https://github.com/mozilla/gecko-dev.git
Bug 998809 - WidgetEvent::typeString is not always set correctly , r=masayuki
This commit is contained in:
Родитель
f3172735cb
Коммит
af1549a12d
|
@ -523,6 +523,7 @@ void
|
|||
Event::SetEventType(const nsAString& aEventTypeArg)
|
||||
{
|
||||
if (mIsMainThreadEvent) {
|
||||
mEvent->typeString.Truncate();
|
||||
mEvent->userType =
|
||||
nsContentUtils::GetEventIdAndAtom(aEventTypeArg, mEvent->eventStructType,
|
||||
&(mEvent->message));
|
||||
|
|
|
@ -157,3 +157,4 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
|
|||
skip-if = buildapp == 'b2g' || e10s
|
||||
[test_bug985988.html]
|
||||
[test_dom_storage_event.html]
|
||||
[test_bug998809.html]
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=998809
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 998809</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 998809 **/
|
||||
var event1 = document.createEvent("Event");
|
||||
event1.initEvent("a", false, false);
|
||||
event1.initEvent("b", false, false);
|
||||
is(event1.type, "b");
|
||||
var event2 = document.createEvent("Event");
|
||||
event2.initEvent("a", false, false);
|
||||
is(event2.type, "a");
|
||||
event2.initEvent("b", false, false);
|
||||
is(event2.type, "b");
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=998809">Mozilla Bug 998809</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче