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
bfd25b4f
Commit
bfd25b4f
authored
Oct 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLScriptElement::put_src tests.
parent
b882b184
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
11 deletions
+71
-11
exectest.html
dlls/mshtml/tests/exectest.html
+67
-11
externscr.js
dlls/mshtml/tests/externscr.js
+1
-0
rsrc.rc
dlls/mshtml/tests/rsrc.rc
+3
-0
No files found.
dlls/mshtml/tests/exectest.html
View file @
bfd25b4f
...
@@ -4,26 +4,82 @@ Script execution test
...
@@ -4,26 +4,82 @@ Script execution test
<div
id=
"b1"
></div>
<div
id=
"b1"
></div>
<div
id=
"b2"
></div>
<div
id=
"b2"
></div>
<div
id=
"b3"
></div>
<div
id=
"b3"
></div>
<script
id=
"emptyscript"
></script>
<script>
<script>
function
ok
(
b
,
msg
)
{
function
ok
(
b
,
msg
)
{
return
external
.
ok
(
b
,
msg
);
return
external
.
ok
(
b
,
msg
);
}
}
var
executed
=
false
;
var
executed
=
false
;
var
len
=
document
.
getElementsByTagName
(
'div'
).
length
;
var
extern_cnt
=
0
;
ok
(
len
===
3
,
"init length = "
+
len
);
document
.
write
(
"<script>"
function
testWriteScript
()
{
+
"var len = document.getElementsByTagName('div').length;"
var
len
=
document
.
getElementsByTagName
(
'div'
).
length
;
+
"ok(len === 3, 'unexpected length ' + len);"
ok
(
len
===
3
,
"init length = "
+
len
);
+
"executed = true;"
+
"<"
+
"/script>"
);
len
=
document
.
getElementsByTagName
(
'script'
).
length
;
document
.
write
(
"<script>"
ok
(
len
===
2
,
"script col length = "
+
len
);
+
"var len = document.getElementsByTagName('div').length;"
ok
(
executed
,
"written script not executed"
);
+
"ok(len === 3, 'unexpected length ' + len);"
+
"executed = true;"
+
"<"
+
"/script>"
);
external
.
reportSuccess
();
len
=
document
.
getElementsByTagName
(
'script'
).
length
;
ok
(
len
===
3
,
"script col length = "
+
len
);
ok
(
executed
,
"written script not executed"
);
}
function
testPutSrc
()
{
var
elem
=
document
.
getElementById
(
"emptyscript"
);
ok
(
extern_cnt
===
0
,
"extern_cnt = "
+
extern_cnt
+
" expected 0"
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
0
,
"extern_cnt = "
+
extern_cnt
+
" expected 0"
);
}
try
{
testWriteScript
();
testPutSrc
();
}
catch
(
e
)
{
ok
(
false
,
"Got an exception"
);
}
function
testPutSrc2
()
{
var
elem
,
elem2
;
elem
=
document
.
createElement
(
"script"
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
1
,
"extern_cnt = "
+
extern_cnt
+
" expected 1"
);
document
.
body
.
appendChild
(
elem
);
ok
(
extern_cnt
===
2
,
"extern_cnt = "
+
extern_cnt
+
" expected 2"
);
elem
=
document
.
createElement
(
"script"
);
document
.
body
.
appendChild
(
elem
);
ok
(
extern_cnt
===
2
,
"extern_cnt = "
+
extern_cnt
+
" expected 2"
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
3
,
"extern_cnt = "
+
extern_cnt
+
" expected 3"
);
elem2
=
document
.
createElement
(
"div"
);
elem
=
document
.
createElement
(
"script"
);
elem
.
src
=
"externscr.js"
;
ok
(
extern_cnt
===
3
,
"extern_cnt = "
+
extern_cnt
+
" expected 3"
);
elem2
.
appendChild
(
elem
);
document
.
body
.
appendChild
(
elem2
);
ok
(
extern_cnt
===
4
,
"extern_cnt = "
+
extern_cnt
+
" expected 4"
);
}
document
.
body
.
onload
=
function
()
{
ok
(
extern_cnt
===
1
,
"extern_cnt = "
+
extern_cnt
);
try
{
testPutSrc2
();
}
catch
(
e
)
{
ok
(
false
,
"got an exception"
);
}
external
.
reportSuccess
();
}
</script>
<script>
ok
(
extern_cnt
===
1
,
"extern_cnt = "
+
extern_cnt
);
</script>
</script>
<div
id=
"a1"
></div>
<div
id=
"a1"
></div>
<div
id=
"a2"
></div>
<div
id=
"a2"
></div>
...
...
dlls/mshtml/tests/externscr.js
0 → 100644
View file @
bfd25b4f
extern_cnt
++
;
dlls/mshtml/tests/rsrc.rc
View file @
bfd25b4f
...
@@ -28,5 +28,8 @@ vbtest.html HTML "vbtest.html"
...
@@ -28,5 +28,8 @@ vbtest.html HTML "vbtest.html"
/* @makedep: events.html */
/* @makedep: events.html */
events.html HTML "events.html"
events.html HTML "events.html"
/* @makedep: externscr.js */
externscr.js HTML "externscr.js"
/* @makedep: test_tlb.tlb */
/* @makedep: test_tlb.tlb */
1 TYPELIB test_tlb.tlb
1 TYPELIB test_tlb.tlb
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