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
578881f6
Commit
578881f6
authored
Dec 07, 2009
by
Andrew Eikum
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLFrameBase::get_name.
parent
c10cd6c1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
9 deletions
+63
-9
htmlframebase.c
dlls/mshtml/htmlframebase.c
+36
-2
dom.c
dlls/mshtml/tests/dom.c
+27
-7
No files found.
dlls/mshtml/htmlframebase.c
View file @
578881f6
...
...
@@ -149,8 +149,42 @@ static HRESULT WINAPI HTMLFrameBase_put_name(IHTMLFrameBase *iface, BSTR v)
static
HRESULT
WINAPI
HTMLFrameBase_get_name
(
IHTMLFrameBase
*
iface
,
BSTR
*
p
)
{
HTMLFrameBase
*
This
=
HTMLFRAMEBASE_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
nsAString
nsstr
;
const
PRUnichar
*
strdata
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
if
(
This
->
nsframe
)
{
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLFrameElement_GetName
(
This
->
nsframe
,
&
nsstr
);
}
else
if
(
This
->
nsiframe
)
{
nsAString_Init
(
&
nsstr
,
NULL
);
nsres
=
nsIDOMHTMLIFrameElement_GetName
(
This
->
nsiframe
,
&
nsstr
);
}
else
{
ERR
(
"No attached ns frame object
\n
"
);
return
E_UNEXPECTED
;
}
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetName failed: 0x%08x
\n
"
,
nsres
);
nsAString_Finish
(
&
nsstr
);
return
E_FAIL
;
}
nsAString_GetData
(
&
nsstr
,
&
strdata
);
if
(
*
strdata
)
{
*
p
=
SysAllocString
(
strdata
);
if
(
!*
p
)
{
nsAString_Finish
(
&
nsstr
);
return
E_OUTOFMEMORY
;
}
}
else
*
p
=
NULL
;
nsAString_Finish
(
&
nsstr
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLFrameBase_put_border
(
IHTMLFrameBase
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
578881f6
...
...
@@ -65,8 +65,9 @@ static const char cond_comment_str[] =
"<!--[if gte IE 4]> <br> <![endif]-->"
"</body></html>"
;
static
const
char
frameset_str
[]
=
"<html><head><title>frameset test</title></head><frameset rows=
\"
2
8
, *
\"
>"
"<html><head><title>frameset test</title></head><frameset rows=
\"
2
5, 25
, *
\"
>"
"<frame src=
\"
about:blank
\"
name=
\"
nm1
\"
id=
\"
fr1
\"
><frame src=
\"
about:blank
\"
name=
\"
nm2
\"
id=
\"
fr2
\"
>"
"<frame src=
\"
about:blank
\"
id=
\"
fr3
\"
>"
"</frameset></html>"
;
static
WCHAR
characterW
[]
=
{
'c'
,
'h'
,
'a'
,
'r'
,
'a'
,
'c'
,
't'
,
'e'
,
'r'
,
0
};
...
...
@@ -5918,7 +5919,7 @@ static void test_frameset(IHTMLDocument2 *doc)
/* test result length */
hres
=
IHTMLFramesCollection2_get_length
(
frames
,
&
length
);
ok
(
hres
==
S_OK
,
"IHTMLFramesCollection2_get_length failed: 0x%08x
\n
"
,
hres
);
ok
(
length
==
2
,
"IHTMLFramesCollection2_get_length should have been 2
, was: %d
\n
"
,
length
);
ok
(
length
==
3
,
"IHTMLFramesCollection2_get_length should have been 3
, was: %d
\n
"
,
length
);
/* test first frame */
V_VT
(
&
index_var
)
=
VT_I4
;
...
...
@@ -5941,8 +5942,8 @@ static void test_frameset(IHTMLDocument2 *doc)
}
VariantClear
(
&
result_var
);
/* fail on
third
frame */
V_I4
(
&
index_var
)
=
2
;
/* fail on
next
frame */
V_I4
(
&
index_var
)
=
3
;
hres
=
IHTMLFramesCollection2_item
(
frames
,
&
index_var
,
&
result_var
);
ok
(
hres
==
DISP_E_MEMBERNOTFOUND
,
"IHTMLFramesCollection2_item should have"
"failed with DISP_E_MEMBERNOTFOUND, instead: 0x%08x
\n
"
,
hres
);
...
...
@@ -5975,7 +5976,7 @@ static void test_frameset(IHTMLDocument2 *doc)
/* test result length */
hres
=
IHTMLWindow2_get_length
(
window
,
&
length
);
ok
(
hres
==
S_OK
,
"IHTMLWindow2_get_length failed: 0x%08x
\n
"
,
hres
);
ok
(
length
==
2
,
"IHTMLWindow2_get_length should have been 2
, was: %d
\n
"
,
length
);
ok
(
length
==
3
,
"IHTMLWindow2_get_length should have been 3
, was: %d
\n
"
,
length
);
/* test first frame */
V_VT
(
&
index_var
)
=
VT_I4
;
...
...
@@ -5998,8 +5999,8 @@ static void test_frameset(IHTMLDocument2 *doc)
}
VariantClear
(
&
result_var
);
/* fail on
third
frame */
V_I4
(
&
index_var
)
=
2
;
/* fail on
next
frame */
V_I4
(
&
index_var
)
=
3
;
hres
=
IHTMLWindow2_item
(
window
,
&
index_var
,
&
result_var
);
ok
(
hres
==
DISP_E_MEMBERNOTFOUND
,
"IHTMLWindow2_item should have"
"failed with DISP_E_MEMBERNOTFOUND, instead: 0x%08x
\n
"
,
hres
);
...
...
@@ -6059,6 +6060,25 @@ static void test_frameset(IHTMLDocument2 *doc)
ok
(
!
strcmp_wa
(
str
,
"no"
),
"get_scrolling should have given 'no', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
/* get_name */
hres
=
IHTMLFrameBase_get_name
(
fbase
,
&
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_get_name failed: 0x%08x
\n
"
,
hres
);
ok
(
!
strcmp_wa
(
str
,
"nm1"
),
"get_name should have given 'nm1', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLFrameBase_Release
(
fbase
);
IHTMLElement_Release
(
elem
);
/* get_name with no name attr */
elem
=
get_doc_elem_by_id
(
doc
,
"fr3"
);
hres
=
IHTMLElement_QueryInterface
(
elem
,
&
IID_IHTMLFrameBase
,
(
void
**
)
&
fbase
);
ok
(
hres
==
S_OK
,
"Could not get IHTMLFrameBase interface: 0x%08x
\n
"
,
hres
);
hres
=
IHTMLFrameBase_get_name
(
fbase
,
&
str
);
ok
(
hres
==
S_OK
,
"IHTMLFrameBase_get_name failed: 0x%08x
\n
"
,
hres
);
ok
(
str
==
NULL
,
"get_name should have given 'null', gave: %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
IHTMLFrameBase_Release
(
fbase
);
IHTMLElement_Release
(
elem
);
}
...
...
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