Skip to content

Commit

Permalink
Bug 1580139 [wpt PR 18960] - MathML: test dynamic changes for on[even…
Browse files Browse the repository at this point in the history
…t] attributes., a=testonly

Automatic update from web-platform-tests
MathML: test dynamic changes for on[event] attributes. (#18960)

* MathML: test dynamic changes for on[event] attributes.

See https://github.com/mathml-refresh/mathml/issues/83

* fix typo

--

wpt-commits: f581209f73e6234d7dfb8ee056f193407ee48b7e
wpt-pr: 18960

UltraBlame original commit: 3df1fcac81f96b8d7c8b7abed1f64849f6165551
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent d5bf53c commit 176d9a4
Show file tree
Hide file tree
Showing 2 changed files with 677 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
"
window
.
copyHappened
copyHappened1
=
true
"
Expand All @@ -263,7 +263,7 @@
"
window
.
cutHappened
cutHappened1
=
true
"
Expand All @@ -272,7 +272,7 @@
"
window
.
pasteHappened
pasteHappened1
=
true
"
Expand Down Expand Up @@ -457,11 +457,10 @@
(
window
[
{
name
+
"
Happened
"
}
Happened1
]
"
Calling
Expand Down Expand Up @@ -494,6 +493,329 @@
property
)
;
test
(
(
)
=
>
{
const
mathEl
=
document
.
createElementNS
(
"
http
:
/
/
www
.
w3
.
org
/
1998
/
Math
/
MathML
"
"
math
"
)
;
assert_equals
(
mathEl
[
handlerName
]
null
The
{
handlerName
}
property
must
be
null
(
no
attribute
)
)
;
mathEl
.
setAttribute
(
handlerName
window
.
{
handlerName
}
Happened2
=
true
;
)
;
const
compiledHandler
=
mathEl
[
handlerName
]
;
assert_equals
(
typeof
compiledHandler
"
function
"
The
{
handlerName
}
property
must
be
a
function
(
set
attribute
)
)
;
compiledHandler
(
)
;
assert_true
(
window
[
{
handlerName
}
Happened2
]
"
Calling
the
handler
must
run
the
code
(
set
attribute
)
"
)
;
window
[
{
handlerName
}
Happened2
]
=
false
;
const
clonedMathEl
=
mathEl
.
cloneNode
(
true
)
;
const
clonedCompiledHandler
=
clonedMathEl
[
handlerName
]
;
assert_equals
(
typeof
clonedCompiledHandler
"
function
"
The
{
handlerName
}
property
must
be
a
function
(
clone
node
)
)
;
clonedCompiledHandler
(
)
;
assert_true
(
window
[
{
handlerName
}
Happened2
]
"
Calling
the
handler
must
run
the
code
(
clone
node
)
"
)
;
mathEl
.
setAttribute
(
handlerName
window
.
{
handlerName
}
Happened3
=
true
;
)
;
const
newCompiledHandler
=
mathEl
[
handlerName
]
;
assert_equals
(
typeof
newCompiledHandler
"
function
"
The
{
handlerName
}
property
must
be
a
function
(
modify
attribute
)
)
;
newCompiledHandler
(
)
;
assert_true
(
window
[
{
handlerName
}
Happened3
]
"
Calling
the
handler
must
run
the
code
(
modify
attribute
)
"
)
;
mathEl
.
removeAttribute
(
handlerName
)
;
assert_equals
(
mathEl
[
handlerName
]
null
The
{
handlerName
}
property
must
be
null
(
remove
attribute
)
)
;
}
{
handlerName
}
:
dynamic
changes
on
the
attribute
)
;
}
EVENTS
.
Expand Down
Loading

0 comments on commit 176d9a4

Please sign in to comment.