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
58d4f541
Commit
58d4f541
authored
Dec 01, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Add detached documents handling tests.
parent
068f2440
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
1 deletion
+47
-1
navigation.js
dlls/mshtml/tests/navigation.js
+47
-1
No files found.
dlls/mshtml/tests/navigation.js
View file @
58d4f541
...
...
@@ -85,6 +85,51 @@ function detached_src_test() {
ok
(
onload_called
===
false
,
"called onload too early?"
);
}
function
detached_iframe_doc
()
{
document
.
body
.
innerHTML
=
""
;
var
iframe
=
document
.
createElement
(
"iframe"
);
var
origDoc
;
function
expect_exception
(
f
,
is_todo
)
{
try
{
f
();
todo_wine_if
(
is_todo
).
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
}
iframe
.
onload
=
guard
(
function
()
{
origDoc
=
iframe
.
contentWindow
.
document
;
iframe
.
onload
=
guard
(
function
()
{
var
doc
=
iframe
.
contentWindow
.
document
;
ok
(
/.*blank2.html/
.
test
(
doc
.
URL
),
"Unexpected iframe doc URL "
+
doc
.
URL
);
if
(
doc
.
documentMode
>=
9
)
{
try
{
origDoc
!=
null
;
// it's not allowed to even compare detached document
todo_wine
.
ok
(
false
,
"expected exception"
);
}
catch
(
e
)
{}
}
else
{
todo_wine
.
ok
(
doc
===
origDoc
,
"doc != origDoc"
);
}
expect_exception
(
function
()
{
origDoc
.
onclick
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
;
},
true
);
expect_exception
(
function
()
{
origDoc
.
toString
();
},
true
);
expect_exception
(
function
()
{
origDoc
.
URL
;
},
true
);
next_test
();
});
iframe
.
src
=
"blank2.html"
;
});
iframe
.
src
=
"blank.html"
;
document
.
body
.
appendChild
(
iframe
);
}
function
init_test_iframe
()
{
var
iframe
=
document
.
createElement
(
"iframe"
);
...
...
@@ -99,5 +144,6 @@ var tests = [
nav_parent_test
,
window_navigate_test
,
window_open_self_test
,
detached_src_test
detached_src_test
,
detached_iframe_doc
];
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