| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
| 5 |
<title>TooltipDialog Widget Automated (non-robot) Tests</title> |
| 6 |
|
| 7 |
<style type="text/css"> |
| 8 |
@import "../../../themes/claro/document.css"; |
| 9 |
@import "../../css/dijitTests.css"; |
| 10 |
</style> |
| 11 |
|
| 12 |
|
| 13 |
<link id="themeStyles" rel="stylesheet" href="../../../themes/claro/claro.css"/> |
| 14 |
|
| 15 |
|
| 16 |
<script type="text/javascript" src="../../../../dojo/dojo.js" |
| 17 |
data-dojo-config="async: true, has: { 'dojo-bidi': true }"></script> |
| 18 |
|
| 19 |
<script type="text/javascript"> |
| 20 |
require([ |
| 21 |
"doh/runner", |
| 22 |
"dijit/registry", |
| 23 |
"dijit/TooltipDialog", |
| 24 |
"dijit/popup", |
| 25 |
"dojo/domReady!" |
| 26 |
], function(doh, registry, TooltipDialog, popup){ |
| 27 |
|
| 28 |
// Setup intentional global |
| 29 |
toggleTextDir = function(){ |
| 30 |
var td = registry.byId("td"); |
| 31 |
td.set("textDir", (td.get("textDir") !== "rtl") ? "rtl" : "ltr"); |
| 32 |
}; |
| 33 |
|
| 34 |
doh.register("tests._BidiSupport.misc.TooltipDialog", [ |
| 35 |
{ |
| 36 |
name: "Bidi TooltipDialog test", |
| 37 |
runTest: function(){ |
| 38 |
var d = new doh.Deferred(); |
| 39 |
var td = new TooltipDialog({ |
| 40 |
id: "td", |
| 41 |
textDir: "rtl", |
| 42 |
title: "Title!", |
| 43 |
content: |
| 44 |
"<input id='dlg1_inputA'><br>" + |
| 45 |
"<input id='dlg1_inputB'><br>" + |
| 46 |
"<input id='dlg1_inputC'><br>" + |
| 47 |
"<input type='button' value='Toggle title textDir' onclick='toggleTextDir();'>" |
| 48 |
}); |
| 49 |
popup.open({ |
| 50 |
popup: td, |
| 51 |
x: 10, |
| 52 |
y: 50 |
| 53 |
}); |
| 54 |
doh.is(String.fromCharCode(8235), td.containerNode.title.charAt(0), "Dialog title tooltip should have direction correspondent to dialog's 'textDir'"); |
| 55 |
} |
| 56 |
} |
| 57 |
]); |
| 58 |
|
| 59 |
doh.run(); |
| 60 |
}); |
| 61 |
</script> |
| 62 |
</head> |
| 63 |
<body class="claro"> |
| 64 |
<h1 class="testTitle">Bidi TooltipDialog Test</h1> |
| 65 |
</body> |
| 66 |
</html> |
| 67 |
|
| 68 |
|