2009-12-07 Rolf Bjarne Kvinge <RKvinge@novell.com>
[moon.git] / test / xaml / test-clip-invalid-update.htm
blobe9f688ca4d3f72d2e1078e14d8c46593ebe0ec56
1 <html>
2 <head>
3 <title>Moonlight Clip Modification Test</title>
4 <script type="text/javascript" src="../js/js/utils.js"></script>
5 <script type="text/javascript" src="../js/js/testplugin.js"></script>
7 <script language="javascript">
8 var control;
10 function OnLoaded(sender, eventArgs)
12 if (document.body == null || !TestPluginReady) {
13 setTimeout (function(){ OnLoaded(sender, eventArgs)}, 100);
14 return;
17 setTimeout (function(){ RunTest(sender, eventArgs)}, 1000);
20 function RunTest (sender, eventArgs)
22 var clip = sender.findName ("clipRect");
23 var clip2 = sender.findName ("clipRect2");
24 var xform = sender.findName ("xform");
25 //alert ("clip " + clip);
26 //alert ("rect: " + clip.Rect);
27 clip.rect = "0,0,100,100";
28 //alert ("set clip");
29 //alert ("clip.Rect = " + clip.Rect);
30 clip2.rect = "0,0,100,100";
31 TestHost.TranslateCoordinates = true;
32 TakeSingleSnapshotAndShutdown ("", "test-clip-invalid-update.htm.png", 500, 500, 100);
33 xform.x = "0";
36 function ErrorHandler (sender, args)
38 alert (args.ErrorMessage);
40 </script>
41 </head>
43 <body scroll="no" style='border-width: 0px'>
44 <div>
45 <embed type="application/x-silverlight"
46 width="500"
47 height="500"
48 id="_MoonlightControl" Source="test-clip-invalid-update.xaml" OnError="ErrorHandler"
49 style="position:absolute; left:0px; top:0px" >
50 </embed>
51 </div>
52 </body>
53 </html>