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
f0bed784
Commit
f0bed784
authored
Sep 05, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Fix test on win98.
parent
b0f52410
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
stream.c
dlls/urlmon/tests/stream.c
+13
-13
No files found.
dlls/urlmon/tests/stream.c
View file @
f0bed784
...
...
@@ -76,6 +76,7 @@ DEFINE_EXPECT(OnStopBinding);
DEFINE_EXPECT
(
OnDataAvailable
);
DEFINE_EXPECT
(
GetBindInfo
);
static
const
CHAR
wszIndexHtmlA
[]
=
"index.html"
;
static
const
WCHAR
wszIndexHtml
[]
=
{
'i'
,
'n'
,
'd'
,
'e'
,
'x'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
WCHAR
INDEX_HTML
[
MAX_PATH
];
static
const
char
szHtmlDoc
[]
=
"<HTML></HTML>"
;
...
...
@@ -260,26 +261,22 @@ static const IBindStatusCallbackVtbl BindStatusCallbackVtbl = {
static
IBindStatusCallback
BindStatusCallback
=
{
&
BindStatusCallbackVtbl
};
static
void
set_file_url
(
void
)
static
void
set_file_url
(
char
*
path
)
{
int
len
;
char
INDEX_HTML_A
[
MAX_PATH
]
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
};
memcpy
(
INDEX_HTML
,
wszFile
,
sizeof
(
wszFile
));
len
=
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
);
INDEX_HTML
[
len
++
]
=
'/'
;
len
+=
GetCurrentDirectoryW
(
sizeof
(
INDEX_HTML
)
/
sizeof
(
WCHAR
)
-
len
,
INDEX_HTML
+
len
);
INDEX_HTML
[
len
++
]
=
'\\'
;
memcpy
(
INDEX_HTML
+
len
,
wszIndexHtml
,
sizeof
(
wszIndexHtml
));
lstrcpyA
(
INDEX_HTML_A
,
"file:///"
);
lstrcatA
(
INDEX_HTML_A
,
path
);
MultiByteToWideChar
(
CP_ACP
,
0
,
INDEX_HTML_A
,
-
1
,
INDEX_HTML
,
MAX_PATH
);
}
static
void
create_file
(
void
)
{
HANDLE
file
;
DWORD
size
;
CHAR
path
[
MAX_PATH
];
file
=
CreateFile
W
(
wszIndexHtml
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
file
=
CreateFile
A
(
wszIndexHtmlA
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
ok
(
file
!=
INVALID_HANDLE_VALUE
,
"CreateFile failed
\n
"
);
if
(
file
==
INVALID_HANDLE_VALUE
)
...
...
@@ -288,7 +285,10 @@ static void create_file(void)
WriteFile
(
file
,
szHtmlDoc
,
sizeof
(
szHtmlDoc
)
-
1
,
&
size
,
NULL
);
CloseHandle
(
file
);
set_file_url
();
GetCurrentDirectoryA
(
MAX_PATH
,
path
);
lstrcatA
(
path
,
"
\\
"
);
lstrcatA
(
path
,
wszIndexHtmlA
);
set_file_url
(
path
);
}
static
void
test_URLOpenBlockingStreamW
(
void
)
...
...
@@ -370,5 +370,5 @@ START_TEST(stream)
create_file
();
test_URLOpenBlockingStreamW
();
test_URLOpenStreamW
();
DeleteFile
W
(
wszIndexHtml
);
DeleteFile
A
(
wszIndexHtmlA
);
}
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