cd7ea23f55f33c4ae3e51d676f9bcdfbd25debce
[test/tct/web/wrt.git] / tct-rt02-wrt-tests / lifecycle-unload-event / index.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2012 Intel Corporation.
4
5 Redistribution and use in source and binary forms, with or without modification,
6 are permitted provided that the following conditions are met:
7
8 * Redistributions of works must retain the original copyright notice, this list
9   of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the original copyright notice,
11   this list of conditions and the following disclaimer in the documentation
12   and/or other materials provided with the distribution.
13 * Neither the name of Intel Corporation nor the names of its contributors
14   may be used to endorse or promote products derived from this work without
15   specific prior written permission.
16
17 THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
18 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
21 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 Authors:
29         Hao, Yunfei <yunfenx.hao@intel.com>
30
31 -->
32
33 <html>
34   <head>
35     <title>WRT Test: lifecycle-unload-event</title>
36     <link rel="author" title="Intel" href="http://www.intel.com"/>
37     <link rel="help" href=""/>
38     <meta name="flags" content=""/>
39     <meta name="assert" content="Check if WRT supports W3C DOM unload event"/>
40     <meta charset="utf-8">
41     <script language="javascript" type="text/javascript">
42
43         window.onbeforeunload = function() {
44             return "unload event success! ";
45         }
46         function closeWindow(){
47             window.location.reload();
48         }
49     </script>
50   </head>
51   <body>
52     <p>1.Touch "run" button to reload the page.</p>
53     <p>2.If there is a popup with the content of "unload event success!",then Pass!</p>
54     <input onclick="closeWindow()" type="button" value="run"/>
55   </body>
56 </html>