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
0286b11c
Commit
0286b11c
authored
Jun 15, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml/tests: Added IHTMLInputTextElement2 tests.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
44792c02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
0 deletions
+68
-0
elements.js
dlls/mshtml/tests/elements.js
+64
-0
rsrc.rc
dlls/mshtml/tests/rsrc.rc
+3
-0
script.c
dlls/mshtml/tests/script.c
+1
-0
No files found.
dlls/mshtml/tests/elements.js
0 → 100644
View file @
0286b11c
/*
* Copyright 2017 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
function
test_input_selection
()
{
var
input
=
document
.
createElement
(
"input"
);
input
.
type
=
"text"
;
input
.
value
=
"test"
;
document
.
body
.
appendChild
(
input
);
function
test_range
(
start
,
end
)
{
ok
(
input
.
selectionStart
===
start
,
"input.selectionStart = "
+
input
.
selectionStart
+
" expected "
+
start
);
ok
(
input
.
selectionEnd
===
end
,
"input.selectionEnd = "
+
input
.
selectionEnd
+
" expected "
+
end
);
}
test_range
(
0
,
0
);
input
.
selectionStart
=
2
;
test_range
(
2
,
2
);
input
.
selectionStart
=
-
1
;
test_range
(
0
,
2
);
input
.
selectionStart
=
10
;
test_range
(
4
,
4
);
input
.
selectionEnd
=
2
;
test_range
(
2
,
2
);
input
.
selectionEnd
=
-
1
;
test_range
(
0
,
0
);
input
.
selectionEnd
=
10
;
test_range
(
0
,
4
);
input
.
setSelectionRange
(
2
,
3
);
test_range
(
2
,
3
);
input
.
setSelectionRange
(
-
1
,
10
);
test_range
(
0
,
4
);
input
.
setSelectionRange
(
3
,
3
);
test_range
(
3
,
3
);
next_test
();
}
var
tests
=
[
test_input_selection
];
dlls/mshtml/tests/rsrc.rc
View file @
0286b11c
...
...
@@ -43,6 +43,9 @@ navigation.js HTML "navigation.js"
/* @makedep: xhr.js */
xhr.js HTML "xhr.js"
/* @makedep: elements.js */
elements.js HTML "elements.js"
/* @makedep: documentmode.js */
documentmode.js HTML "documentmode.js"
...
...
dlls/mshtml/tests/script.c
View file @
0286b11c
...
...
@@ -3459,6 +3459,7 @@ static void run_js_tests(void)
init_protocol_handler
();
run_script_as_http_with_mode
(
"xhr.js"
,
NULL
,
"11"
);
run_script_as_http_with_mode
(
"elements.js"
,
NULL
,
"11"
);
run_script_as_http_with_mode
(
"navigation.js"
,
NULL
,
NULL
);
run_script_as_http_with_mode
(
"navigation.js"
,
NULL
,
"11"
);
...
...
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