mshtml: Added document.documentMode tests.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-07-05 22:47:56 +02:00 committed by Alexandre Julliard
parent 6614df04a8
commit 429e0dde69
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,37 @@
/*
* Copyright 2016 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_doc_mode() {
var opt = parseInt(document.location.search.substring(1));
trace("Testing document mode " + opt);
if(opt > document.documentMode) {
win_skip("Document mode not supported (expected " + opt + " got " + document.documentMode + ")");
reportSuccess();
return;
}
ok(opt === document.documentMode, "documentMode = " + document.documentMode);
next_test();
}
var tests = [
test_doc_mode
];

View File

@ -40,6 +40,9 @@ navigation.js HTML "navigation.js"
/* @makedep: xhr.js */
xhr.js HTML "xhr.js"
/* @makedep: documentmode.js */
documentmode.js HTML "documentmode.js"
/* @makedep: blank.html */
blank.html HTML "blank.html"

View File

@ -3320,6 +3320,15 @@ static void run_js_tests(void)
run_script_as_http_with_mode("xhr.js", NULL, "11");
run_script_as_http_with_mode("navigation.js", NULL, NULL);
run_script_as_http_with_mode("navigation.js", NULL, "11");
run_script_as_http_with_mode("documentmode.js", "?5", NULL);
run_script_as_http_with_mode("documentmode.js", "?5", "5");
run_script_as_http_with_mode("documentmode.js", "?5", "6");
run_script_as_http_with_mode("documentmode.js", "?7", "7");
run_script_as_http_with_mode("documentmode.js", "?8", "8");
run_script_as_http_with_mode("documentmode.js", "?9", "9");
run_script_as_http_with_mode("documentmode.js", "?10", "10");
run_script_as_http_with_mode("documentmode.js", "?11", "11");
}
static BOOL init_registry(BOOL init)