Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b6bc92aa
Commit
b6bc92aa
authored
Jan 15, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLScriptElement::put_text tests.
parent
1aa8742d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletion
+52
-1
exectest.html
dlls/mshtml/tests/exectest.html
+52
-1
No files found.
dlls/mshtml/tests/exectest.html
View file @
b6bc92aa
...
...
@@ -5,6 +5,7 @@ Script execution test
<div
id=
"b2"
></div>
<div
id=
"b3"
></div>
<script
id=
"emptyscript"
></script>
<script
id=
"put_text_script"
>
2
+
2
</script>
<script>
function
ok
(
b
,
msg
)
{
return
external
.
ok
(
b
,
msg
);
...
...
@@ -12,6 +13,7 @@ function ok(b, msg) {
var
executed
=
false
;
var
extern_cnt
=
0
;
var
exec_cnt
;
function
testWriteScript
()
{
var
len
=
document
.
getElementsByTagName
(
'div'
).
length
;
...
...
@@ -24,7 +26,7 @@ function testWriteScript() {
+
"<"
+
"/script>"
);
len
=
document
.
getElementsByTagName
(
'script'
).
length
;
ok
(
len
===
3
,
"script col length = "
+
len
);
ok
(
len
===
4
,
"script col length = "
+
len
);
ok
(
executed
,
"written script not executed"
);
}
...
...
@@ -36,9 +38,22 @@ function testPutSrc() {
ok
(
extern_cnt
===
0
,
"extern_cnt = "
+
extern_cnt
+
" expected 0"
);
}
function
testPutText
()
{
var
elem
=
document
.
getElementById
(
"put_text_script"
);
exec_cnt
=
0
;
elem
.
text
=
"exec_cnt++;"
;
ok
(
exec_cnt
===
1
,
"put_text_script exec_cnt "
+
exec_cnt
);
exec_cnt
=
0
;
elem
.
text
=
"exec_cnt++;"
;
ok
(
exec_cnt
===
1
,
"put_text_script exec_cnt "
+
exec_cnt
);
}
try
{
testWriteScript
();
testPutSrc
();
testPutText
();
}
catch
(
e
)
{
ok
(
false
,
"Got an exception"
);
}
...
...
@@ -67,10 +82,46 @@ function testPutSrc2() {
ok
(
extern_cnt
===
4
,
"extern_cnt = "
+
extern_cnt
+
" expected 4"
);
}
function
testPutText2
()
{
var
elem
;
elem
=
document
.
createElement
(
"script"
);
exec_cnt
=
0
;
elem
.
text
=
"exec_cnt++;"
;
ok
(
exec_cnt
===
0
,
"script exec_cnt "
+
exec_cnt
);
document
.
body
.
appendChild
(
elem
);
ok
(
exec_cnt
===
1
,
"script exec_cnt "
+
exec_cnt
);
exec_cnt
=
0
;
elem
.
text
=
"exec_cnt++;"
;
ok
(
exec_cnt
===
1
,
"script exec_cnt "
+
exec_cnt
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
5
,
"extern_cnt = "
+
extern_cnt
+
" expected 5"
);
exec_cnt
=
0
;
ok
(
extern_cnt
===
5
,
"> extern_cnt = "
+
extern_cnt
+
" expected 5"
);
elem
.
text
=
"exec_cnt++;"
;
/* forces evaluation, but src will be executed */
ok
(
exec_cnt
===
0
,
"script exec_cnt "
+
exec_cnt
);
ok
(
extern_cnt
===
6
,
"< extern_cnt = "
+
extern_cnt
+
" expected 6"
);
elem
=
document
.
createElement
(
"script"
);
exec_cnt
=
0
;
elem
.
text
=
"exec_cnt++;"
;
ok
(
exec_cnt
===
0
,
"script exec_cnt "
+
exec_cnt
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
6
,
"extern_cnt = "
+
extern_cnt
+
" expected 6"
);
document
.
body
.
appendChild
(
elem
);
ok
(
exec_cnt
===
0
,
"script exec_cnt "
+
exec_cnt
);
ok
(
extern_cnt
===
7
,
"extern_cnt = "
+
extern_cnt
+
" expected 7"
);
}
document
.
body
.
onload
=
function
()
{
ok
(
extern_cnt
===
1
,
"extern_cnt = "
+
extern_cnt
);
try
{
testPutSrc2
();
testPutText2
();
}
catch
(
e
)
{
ok
(
false
,
"got an exception"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment