Module: tools
Branch: master
Commit: d6523a05cd74501cab92c6451275819757b67ba1
URL: http://source.winehq.org/git/tools.git/?a=commit;h=d6523a05cd74501cab92c645…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Dec 18 23:53:51 2017 +0100
testbot: Save the status of all VMs on startup.
This allows providing more information about the initial state of the
VMs such as linking running VMs to the corresponding Task, and
identifying the initial dirty status as running 'LibvirtTool checkidle'.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Engine.pl | 44 ++++++++++++++++++++++++++++++++++--------
testbot/lib/WineTestBot/VMs.pm | 7 +++++++
2 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 7dab98e..36a18ad 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -52,6 +52,7 @@ use WineTestBot::Jobs;
use WineTestBot::Log;
use WineTestBot::Patches;
use WineTestBot::PendingPatchSets;
+use WineTestBot::RecordGroups;
use WineTestBot::Utils;
use WineTestBot::VMs;
@@ -102,7 +103,7 @@ sub Cleanup($;$$)
# Verify that the running tasks are still alive and requeue them if not.
# Ignore the Job and Step status fields because they may be a bit out of date.
- my %BusyVMs;
+ my %RunningVMs;
foreach my $Job (@{CreateJobs()->GetItems()})
{
my $CallUpdateStatus;
@@ -135,7 +136,7 @@ sub Cleanup($;$$)
{
# This task is still running!
LogMsg "$TaskKey is still running\n";
- $BusyVMs{$Task->VM->GetKey()} = 1;
+ $RunningVMs{$Task->VM->GetKey()} = join(" ", "running", $Job->Id, $Step->No, $Task->No);
next;
}
if ($Requeue)
@@ -158,16 +159,27 @@ sub Cleanup($;$$)
}
# Get the VMs in order now
+ my $RecordGroups = CreateRecordGroups();
+ my $Records = $RecordGroups->Add()->Records;
+ # Save the new RecordGroup now so its Id is lower than those of the groups
+ # created by the scripts called from Cleanup().
+ $RecordGroups->Save();
+
my $VMs = CreateVMs();
- $VMs->FilterEnabledRole();
- $VMs->FilterEnabledStatus();
foreach my $VM (@{$VMs->GetItems()})
{
my $VMKey = $VM->GetKey();
- if ($BusyVMs{$VMKey})
+ if (!$VM->HasEnabledRole() or !$VM->HasEnabledStatus())
+ {
+ $VM->RecordStatus($Records);
+ next;
+ }
+
+ if ($RunningVMs{$VMKey})
{
# This VM is still running a task. Let it.
- LogMsg "$VMKey is used by a task\n";
+ LogMsg "$VMKey is $RunningVMs{$VMKey}\n";
+ $VM->RecordStatus($Records, $RunningVMs{$VMKey});
next;
}
@@ -177,27 +189,39 @@ sub Cleanup($;$$)
{
$VM->KillChild();
$VM->RunPowerOff();
+ $VM->RecordStatus($Records, "dirty poweroff (kill tasks)");
}
elsif ($KillVMs and $VM->Status ne "running")
{
$VM->KillChild();
# $KillVMs is normally used on shutdown so don't start a process that
# will get stuck 'forever' waiting for an offline VM.
- $VM->RunPowerOff() if ($VM->Status ne "offline");
+ if ($VM->Status ne "offline")
+ {
+ $VM->RunPowerOff();
+ $VM->RecordStatus($Records, "dirty poweroff (kill vms)");
+ }
}
elsif (!$VM->CanHaveChild())
{
# The VM should not have a process.
$VM->KillChild();
$VM->RunPowerOff();
+ $VM->RecordStatus($Records, "dirty poweroff (unexpected process)");
+ }
+ elsif ($Starting)
+ {
+ # Let the process finish its work. Note that on shutdown we don't
+ # record the VM status if it did not change.
+ $VM->RecordStatus($Records);
}
- # else let the process finish its work
}
elsif ($Starting)
{
if ($VM->Status eq "idle")
{
$VM->RunCheckIdle();
+ $VM->RecordStatus($Records, "dirty idle check");
}
else
{
@@ -205,6 +229,7 @@ sub Cleanup($;$$)
# This is the simplest way to resync the VM status field.
# Also powering off a powered off VM will detect offline VMs.
$VM->RunPowerOff();
+ $VM->RecordStatus($Records, "dirty poweroff");
}
}
# $KillVMs is normally used on shutdown so don't start a process that
@@ -212,8 +237,11 @@ sub Cleanup($;$$)
elsif ($KillVMs and $VM->Status !~ /^(?:off|offline)$/)
{
$VM->RunPowerOff();
+ $VM->RecordStatus($Records, "dirty poweroff (kill vms)");
}
+ # Note that on shutdown we don't record the VM status if it did not change.
}
+ $RecordGroups->Save();
}
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index a8da842..961be52 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -183,6 +183,13 @@ sub HasEnabledRole($)
return $self->Role ne "retired" && $self->Role ne "deleted";
}
+sub HasEnabledStatus($)
+{
+ my ($self) = @_;
+ # Filter out the maintenance VMs
+ return $self->Status ne "maintenance";
+}
+
sub GetHost($)
{
my ($self) = @_;
Module: tools
Branch: master
Commit: 463e3cd3ac7c5dd5bf1355b081d9f202f71dc3c7
URL: http://source.winehq.org/git/tools.git/?a=commit;h=463e3cd3ac7c5dd5bf1355b0…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Dec 18 23:53:47 2017 +0100
testbot: Keep a record of the status of the VMs.
Each row of the new Records table allows storing part of the details
of an event or of the state of the TestBot. These pieces of information
are put together into groups and timestamped through the RecordGroups
table. Together these tables allow rebuilding the activity of the
TestBot.
The first user of these new tables is the job scheduler which uses them
to store the new VM status if it changed. This will allow rebuilding
and visualizing the activity of the TestBot for monitoring or debugging.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Janitor.pl | 21 ++
testbot/ddl/update29.sql | 20 ++
testbot/ddl/winetestbot.sql | 19 ++
testbot/doc/winetestbot-schema.dia | 338 ++++++++++++++++++++++++++++++++
testbot/lib/WineTestBot/Jobs.pm | 64 +++++-
testbot/lib/WineTestBot/RecordGroups.pm | 117 +++++++++++
testbot/lib/WineTestBot/Records.pm | 126 ++++++++++++
testbot/lib/WineTestBot/VMs.pm | 60 ++++++
8 files changed, 760 insertions(+), 5 deletions(-)
Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=463e3cd3ac7c5dd5bf13…
Module: website
Branch: master
Commit: c2a3eea28bce9a51dfde43f85cc9b593982f0860
URL: http://source.winehq.org/git/website.git/?a=commit;h=c2a3eea28bce9a51dfde43…
Author: Julian Rüger <jr98(a)gmx.net>
Date: Fri Dec 15 16:12:37 2017 +0100
German translation for release 2.22
Signed-off-by: Julian Rüger <jr98(a)gmx.net>
Signed-off-by: Jeremy Newman <jnewman(a)codeweavers.com>
---
news/de/2017112401.xml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/news/de/2017112401.xml b/news/de/2017112401.xml
new file mode 100644
index 0000000..5a38e06
--- /dev/null
+++ b/news/de/2017112401.xml
@@ -0,0 +1,17 @@
+<news>
+<date>24. November 2017</date>
+<title>Wine 2.22 freigegeben</title>
+<body>
+<p> Die Entwicklungsversion 2.22 von Wine ist jetzt verfügbar.</p>
+<p> <a href="{$root}/announce/2.22">Neuerungen (en)</a> in dieser Version:</p>
+<ul>
+ <li>Quellauswahldialog für Scanner.</li>
+ <li>Verbesserte ARM64-Unterstützung.</li>
+ <li>Float-Audioformate mit mehr als 2 Kanälen in XAudio.</li>
+ <li>Korrekturen an der DLL-Injektionsunterstützung.</li>
+ <li>Verbesserungen an den Inputmethoden.</li>
+ <li>Diverse Fehlerkorrekturen.</li>
+</ul>
+<p>Der Quelltext ist ab sofort <a href="//dl.winehq.org/wine/source/2.x/wine-2.22.tar.xz">verfügbar</a>.
+Binärpakete werden gerade erstellt und stehen bald auf den jeweiligen <a href="{$root}/download">Downloadseiten</a> zur Verfügung.
+</p></body></news>
Module: website
Branch: master
Commit: f0f36f09df34ed1bf3ef8984544ddbe389cf565c
URL: http://source.winehq.org/git/website.git/?a=commit;h=f0f36f09df34ed1bf3ef89…
Author: Julian Rüger <jr98(a)gmx.net>
Date: Fri Dec 15 16:22:10 2017 +0100
German translation for release 3.0-rc1
Signed-off-by: Julian Rüger <jr98(a)gmx.net>
Signed-off-by: Jeremy Newman <jnewman(a)codeweavers.com>
---
news/de/2017120801.xml | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/news/de/2017120801.xml b/news/de/2017120801.xml
new file mode 100644
index 0000000..fe1c0ce
--- /dev/null
+++ b/news/de/2017120801.xml
@@ -0,0 +1,21 @@
+<news>
+<date>8. Dezember 2017</date>
+<title>Wine 3.0-rc1 freigegeben</title>
+<body>
+<p> Die Entwicklungsversion 3.0-rc1 von Wine ist jetzt verfügbar.</p>
+<p> Dies ist der erste Release Candidate des bevorstehenden Wine 3.0. Hiermit beginnt der Code-freeze. Es gab viele Änderungen in letzter Minute, daher bitten wir Sie, dieses Release ausführlich zu testen. Damit helfen Sie uns, Wine 3.0 so gut wie möglich zu machen.</p>
+<p> <a href="{$root}/announce/3.0-rc1">Neuerungen (en)</a> in dieser Version:</p>
+<ul>
+ <li>Direct3D 11 ist auf AMD- und Intel-Grafik nun standardmäßig aktiviert.</li>
+ <li>AES-Verschlüsselung unter macOS.</li>
+ <li>Implementierung des Taskplaners.</li>
+ <li>Unterstützung der Exportfunktion des reg.exe-Werkzeugs.</li>
+ <li>Progman-DDE-Unterstützung.</li>
+ <li>Verbesserungen des Zwischenspeichers für OLE-Daten.</li>
+ <li>Weitere Event-Unterstützung in MSHTML.</li>
+ <li>Verbessertes Relay-Debugging.</li>
+ <li>Diverse Fehlerkorrekturen.</li>
+</ul>
+<p>Der Quelltext ist ab sofort <a href="//dl.winehq.org/wine/source/3.0/wine-3.0-rc1.tar.xz">verfügbar</a>.
+Binärpakete werden gerade erstellt und stehen bald auf den jeweiligen <a href="{$root}/download">Downloadseiten</a> zur Verfügung.
+</p></body></news>
Module: website
Branch: master
Commit: d7a76c419f5093df2057cbf07bc4669776973dc6
URL: http://source.winehq.org/git/website.git/?a=commit;h=d7a76c419f5093df2057cb…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Fri Dec 15 21:46:44 2017 +0100
Wine release 3.0-rc2
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
news/en/2017121501.xml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/news/en/2017121501.xml b/news/en/2017121501.xml
new file mode 100644
index 0000000..b3e603e
--- /dev/null
+++ b/news/en/2017121501.xml
@@ -0,0 +1,12 @@
+<news>
+<date>December 15, 2017</date>
+<title>Wine 3.0-rc2 Released</title>
+<body>
+<p> The Wine development release 3.0-rc2 is now available.</p>
+<p> <a href="{$root}/announce/3.0-rc2">What's new</a> in this release:
+<ul>
+ <li>Bug fixes only, we are in code freeze.</li>
+</ul>
+<p>The source is <a href="//dl.winehq.org/wine/source/3.0/wine-3.0-rc2.tar.xz">available now</a>.
+Binary packages are in the process of being built, and will appear soon at their respective <a href="{$root}/download">download locations</a>.
+</p></body></news>
Module: wine
Branch: master
Commit: 224d284f99416ef5b56cd36284d289447a7f5edb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=224d284f99416ef5b56cd3628…
Author: Alex Henrie <alexhenrie24(a)gmail.com>
Date: Wed Dec 13 23:23:28 2017 -0700
include: Discourage use of 'break' or 'continue' inside __TRY/__EXCEPT.
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
include/wine/exception.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/include/wine/exception.h b/include/wine/exception.h
index 5bc4d1c..8e3f481 100644
--- a/include/wine/exception.h
+++ b/include/wine/exception.h
@@ -61,10 +61,12 @@ extern "C" {
* use GetExceptionInformation() and GetExceptionCode() to retrieve the
* exception info.
*
- * Warning: inside a __TRY or __EXCEPT block, 'break' or 'continue' statements
- * break out of the current block. You cannot use 'return', 'goto'
- * or 'longjmp' to leave a __TRY block, as this will surely crash.
- * You can use them to leave a __EXCEPT block though.
+ * Warning: Inside a __TRY or __EXCEPT block, 'break' or 'continue' statements
+ * break out of the current block, but avoid using them because they
+ * won't work when compiling with native exceptions. You cannot use
+ * 'return', 'goto', or 'longjmp' to leave a __TRY block either, as
+ * this will surely crash. You can use 'return', 'goto', or 'longjmp'
+ * to leave an __EXCEPT block though.
*
* -- AJ
*/
Module: wine
Branch: master
Commit: e562d4de81432f7206217b066514953b553f90ae
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e562d4de81432f7206217b066…
Author: Martin Payne <development(a)martinpayne.me.uk>
Date: Wed Dec 13 10:21:00 2017 +0000
kernel32: Don't report valid non-Win16 NE executables (e.g. OS/2) as broken.
Signed-off-by: Martin Payne <development(a)martinpayne.me.uk>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/kernel32/module.c | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index b4d5fe7..c0d9918 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -253,8 +253,8 @@ BOOL WINAPI DisableThreadLibraryCalls( HMODULE hModule )
/* Check whether a file is an OS/2 or a very old Windows executable
* by testing on import of KERNEL.
*
- * FIXME: is reading the module imports the only way of discerning
- * old Windows binaries from OS/2 ones ? At least it seems so...
+ * Reading the module imports is the only reasonable way of discerning
+ * old Windows binaries from OS/2 ones.
*/
static DWORD MODULE_Decide_OS2_OldWin(HANDLE hfile, const IMAGE_DOS_HEADER *mz, const IMAGE_OS2_HEADER *ne)
{
@@ -270,31 +270,28 @@ static DWORD MODULE_Decide_OS2_OldWin(HANDLE hfile, const IMAGE_DOS_HEADER *mz,
|| (!(modtab = HeapAlloc( GetProcessHeap(), 0, ne->ne_cmod*sizeof(WORD))))
|| (!(ReadFile(hfile, modtab, ne->ne_cmod*sizeof(WORD), &len, NULL)))
|| (len != ne->ne_cmod*sizeof(WORD)) )
- goto broken;
+ goto done;
/* read imported names table */
if ( (SetFilePointer( hfile, mz->e_lfanew + ne->ne_imptab, NULL, SEEK_SET ) == -1)
|| (!(nametab = HeapAlloc( GetProcessHeap(), 0, ne->ne_enttab - ne->ne_imptab)))
|| (!(ReadFile(hfile, nametab, ne->ne_enttab - ne->ne_imptab, &len, NULL)))
|| (len != ne->ne_enttab - ne->ne_imptab) )
- goto broken;
+ goto done;
for (i=0; i < ne->ne_cmod; i++)
{
- LPSTR module = &nametab[modtab[i]];
- TRACE("modref: %.*s\n", module[0], &module[1]);
- if (!(strncmp(&module[1], "KERNEL", module[0])))
- { /* very old Windows file */
- MESSAGE("This seems to be a very old (pre-3.0) Windows executable. Expect crashes, especially if this is a real-mode binary !\n");
+ LPSTR module = &nametab[modtab[i]];
+ TRACE("modref: %.*s\n", module[0], &module[1]);
+ if (!(strncmp(&module[1], "KERNEL", module[0])))
+ { /* very old Windows file */
+ MESSAGE("This seems to be a very old (pre-3.0) Windows executable. Expect crashes, especially if this is a real-mode binary !\n");
ret = BINARY_WIN16;
- goto good;
- }
+ break;
+ }
}
-broken:
- ERR("Hmm, an error occurred. Is this binary file broken?\n");
-
-good:
+done:
HeapFree( GetProcessHeap(), 0, modtab);
HeapFree( GetProcessHeap(), 0, nametab);
SetFilePointer( hfile, currpos, NULL, SEEK_SET); /* restore filepos */
Module: tools
Branch: master
Commit: 34adab8664660164d7dbf197bbd2204695373cde
URL: http://source.winehq.org/git/tools.git/?a=commit;h=34adab8664660164d7dbf197…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Dec 8 04:29:39 2017 +0100
testbot: Minor cosmetic tweaks to the installation guide.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/doc/INSTALL.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/doc/INSTALL.txt b/testbot/doc/INSTALL.txt
index 9947150..15b2b91 100644
--- a/testbot/doc/INSTALL.txt
+++ b/testbot/doc/INSTALL.txt
@@ -42,7 +42,7 @@ General setup for the web site:
cd var
touch log
mkdir jobs latest patches socket staging
- sudo chown WWWRUN:winehq staging
+ sudo chown wwwrun:winehq staging
chmod g+w *
- Install scripts/initd in /etc/init.d/winetestbot and adjust the paths and
user name if necessary. Then activate it.
@@ -120,7 +120,7 @@ Dependencies:
- Create a Linux VM and set it up so it can generate PE executables
with MinGW. For instance on Debian you should install autoconf,
bison, flex, gcc, gcc-mingw-w64, git and make. If you are going to
- have 64bit VMs then make sure MinGW can generate 64bit PE executables.
+ have 64 bit VMs then make sure MinGW can generate 64 bit PE executables.
- You may also want to install ccache.
- You will also need genisoimage.
- Create a new user, 'testbot' for instance, and log in as that user.
Module: tools
Branch: master
Commit: 942bf9d4885ccd0ba940aec95f3e26a0b905642b
URL: http://source.winehq.org/git/tools.git/?a=commit;h=942bf9d4885ccd0ba940aec9…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Dec 8 04:20:24 2017 +0100
testbot: Document Collection::DeleteItem().
In particular note that it cascades to other tables that have foreign
keys to the row being deleted.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/ObjectModel/Collection.pm | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 1b29ec1..6c1bd1d 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -550,6 +550,20 @@ sub GetMasterCols($)
return ($self->{MasterColNames}, $self->{MasterColValues});
}
+=pod
+=over 12
+
+=item C<DeleteItem()>
+
+Deletes the specified Item from the Collection and the database backing it.
+
+Note that if there are other tables with a foreign key referencing this item
+the corresponding rows will be deleted too. So for instance deleting a Job
+will also delete the Steps and Tasks it is composed of.
+
+=back
+=cut
+
sub DeleteItem($$)
{
my ($self, $Item) = @_;
Module: tools
Branch: master
Commit: 7aa19f46807d2db27a2203c62e6b1e7e8f65f62a
URL: http://source.winehq.org/git/tools.git/?a=commit;h=7aa19f46807d2db27a2203c6…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Fri Dec 8 04:27:47 2017 +0100
testbot: Assorted wording fixes.
Signed-off-by: Francois Gouget <fgouget(a)free.fr>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineSendLog.pl | 2 +-
testbot/lib/ObjectModel/Collection.pm | 2 +-
testbot/lib/WineTestBot/Users.pm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index 2e23976..62024d9 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -394,7 +394,7 @@ EOF
{
# Filter out failures that happened in the full test suite:
# the test suite is run against code which is already in Wine
- # so all any failure it reported not caused by this patch.
+ # so any failure it reported is not caused by this patch.
$MessagesFromLog = CompareLogs("$LatestName.log", "$TaskDir/log",
$BaseName, $StepTask->CmdLineArg);
}
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 6c1bd1d..d441860 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -521,7 +521,7 @@ sub KeyChanged($$$)
if (defined($self->{Items}{$NewKey}))
{
- die "Cant change key, new key $NewKey already exists";
+ die "Could not change key, new key $NewKey already exists";
}
$FullKey = $self->GetFullKey($NewKey);
$ScopeItems->{$FullKey} = $Item if (defined $FullKey);
diff --git a/testbot/lib/WineTestBot/Users.pm b/testbot/lib/WineTestBot/Users.pm
index 2139b6d..7b18df9 100644
--- a/testbot/lib/WineTestBot/Users.pm
+++ b/testbot/lib/WineTestBot/Users.pm
@@ -190,7 +190,7 @@ From: $RobotEMail
To: $Recipient
Subject: winetestbot account request
-password reset request for your account $UserName was received via the website.
+A password reset request for your account $UserName was received via the website.
You can pick a new password by going to:
$URL
EOF
Module: wine
Branch: master
Commit: e6f7a759ed80da115ffbcc5e9777d485153f6cdf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e6f7a759ed80da115ffbcc5e9…
Author: Jacek Caban <jacek(a)codeweavers.com>
Date: Tue Dec 12 15:28:04 2017 +0100
mshtml/tests: Added a test of calls to functions from different frame.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/mshtml/tests/elements.js | 16 ++++++++++++++++
dlls/mshtml/tests/frame.js | 25 +++++++++++++++++++++++++
dlls/mshtml/tests/rsrc.rc | 6 ++++++
dlls/mshtml/tests/runscript.html | 11 +++++++++++
4 files changed, 58 insertions(+)
diff --git a/dlls/mshtml/tests/elements.js b/dlls/mshtml/tests/elements.js
index 6e193ee..a16194f 100644
--- a/dlls/mshtml/tests/elements.js
+++ b/dlls/mshtml/tests/elements.js
@@ -104,6 +104,21 @@ function test_head() {
next_test();
}
+function test_iframe() {
+ document.body.innerHTML = '<iframe src="runscript.html?frame.js"></iframe>'
+ var iframe = document.body.firstChild;
+
+ iframe.onload = guard(function() {
+ var r = iframe.contentWindow.global_object.get_global_value();
+ ok(r === "global value", "get_global_value() returned " + r);
+
+ var f = iframe.contentWindow.global_object.get_global_value;
+ ok(f() === "global value", "f() returned " + f());
+
+ next_test();
+ });
+}
+
function test_getElementsByClassName() {
var elems;
@@ -178,6 +193,7 @@ var tests = [
test_ElementTraversal,
test_getElementsByClassName,
test_head,
+ test_iframe,
test_query_selector,
test_compare_position
];
diff --git a/dlls/mshtml/tests/frame.js b/dlls/mshtml/tests/frame.js
new file mode 100644
index 0000000..588405c
--- /dev/null
+++ b/dlls/mshtml/tests/frame.js
@@ -0,0 +1,25 @@
+/*
+ * 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
+ */
+
+var global_value = "global value";
+
+var global_object = {
+ get_global_value: function() {
+ return global_value;
+ }
+};
diff --git a/dlls/mshtml/tests/rsrc.rc b/dlls/mshtml/tests/rsrc.rc
index ec2b729..df5b469 100644
--- a/dlls/mshtml/tests/rsrc.rc
+++ b/dlls/mshtml/tests/rsrc.rc
@@ -34,6 +34,12 @@ vbtest.html HTML "vbtest.html"
/* @makedep: events.html */
events.html HTML "events.html"
+/* @makedep: runscript.html */
+runscript.html HTML "runscript.html"
+
+/* @makedep: frame.js */
+frame.js HTML "frame.js"
+
/* @makedep: externscr.js */
externscr.js HTML "externscr.js"
diff --git a/dlls/mshtml/tests/runscript.html b/dlls/mshtml/tests/runscript.html
new file mode 100644
index 0000000..a4d0ac5
--- /dev/null
+++ b/dlls/mshtml/tests/runscript.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ </head>
+ <script>
+ var q = document.location.search.replace("?", "");
+ if(q) document.write('<s'+'cript src="' + q + '"></s'+'cript>');
+ </script>
+ <body>
+ </body>
+</html>