source: Dev/trunk/src/client/dojox/html/tests/remote/getResponse.php

Last change on this file was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 2.8 KB
Line 
1<?php
2        // this file is just a bouncer for ContentPane.html test
3        error_reporting(E_ALL ^ E_NOTICE);
4       
5        if(isset($_GET['mode'])){
6                switch($_GET['mode']){
7                        case 'htmlPaths':
8                                echo "<img src='../images/testImage.gif' id='imgTest'/>
9                                        <div id='inlineStyleTest' style='width:188px;height:125px;background-image:url(../images/testImage.gif)'></div>
10                                        <style>@import 'getResponse.php?mode=importCss';</style>
11                                        <link type='text/css' rel='stylesheet' href='getResponse.php?mode=linkCss'>
12                                        <div id='importCssTest'></div>
13                                        <div id='linkCssTest'></div>
14                                        <div id='importMediaTest'></div>
15                                        <div id='linkMediaTest'></div>
16                                        <!-- these may download but not render -->
17                                        <style media='print'>@import 'getResponse.php?mode=importMediaPrint';</style>
18                                        <link media='print' type='text/css' rel='stylesheet' href='getResponse.php?mode=linkMediaPrint'>
19                                        ";
20                                break;
21       
22                        case 'importCss':
23                                header('Content-type: text/css; charset=utf-8');
24                                echo "#importMediaTest {
25                                        margin: 4px;
26                                        border: 1px dashed red;
27                                        width: 200px;
28                                        height: 200px;
29                                }
30                                #importCssTest {
31                                                margin: 4px;
32                                                border: 1px solid blue;
33                                                width: 100px;
34                                                height: 100px;
35                                        }";
36                                break;
37       
38                        case 'linkCss':
39                                header('Content-type: text/css; charset=utf-8');
40                                echo "#linkMediaTest {
41                                        margin: 4px;
42                                        border: 2px dashed red;
43                                        width: 200px;
44                                        height: 200px;
45                                }
46                                #linkCssTest {
47                                        margin: 4px;
48                                        border: 2px dashed red;
49                                        width: 100px;
50                                        height: 100px;
51                                }";
52                                break;
53
54                        case 'importMediaPrint': // may download but not render
55                                header('Content-type: text/css; charset=utf-8');
56                                echo "#importMediaTest {
57                                        margin: 10px;
58                                        border: 5px dashed gray;
59                                        width: 100px;
60                                        height: 100px;
61                                }";
62                                break;
63
64                        case 'linkMediaPrint': // may download but not render
65                                header('Content-type: text/css; charset=utf-8');
66                                echo "#linkMediaTest {
67                                        margin: 10px;
68                                        border: 5px dashed gray;
69                                        width: 100px;
70                                        height: 100px;
71                                }";
72                                break;
73       
74                        case 'remoteJsTrue':
75                                header('Content-type: text/javascript; charset=utf-8');
76                                echo "unTypedVarInDocScope = true;";
77                                break;
78       
79                        case 'remoteJsFalse':
80                                header('Content-type: text/javascript; charset=utf-8');
81                                echo "unTypedVarInDocScope = false;";
82                                break;
83                        case 'entityChars':
84                                header('Content-type: text/css; charset=utf-8');
85                                if($_GET['entityEscaped'] == null){                                                                                   
86                                        print("var div = document.createElement(\"div\"); document.body.appendChild(div); div.innerHTML = \"<div id=\\\"should_not_be_here2\\\"></div>\"; window.__remotePaneLoaded2 = true;" );
87                                }else{
88                                        print("window.__remotePaneLoaded2 = true;");
89                                }
90                                break;
91                        default:
92                                echo "unknown mode: ".htmlentities($_GET['mode']);
93                }
94        }
95?>
Note: See TracBrowser for help on using the repository browser.