| 1 |
<!DOCTYPE html> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> |
| 5 |
<title>Dialog 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 |
"dojo/query", |
| 23 |
"dijit/Dialog", |
| 24 |
"dojo/domReady!" |
| 25 |
], function(doh, query, Dialog){ |
| 26 |
toggleTextDir = function(){ |
| 27 |
dlg.set("textDir", (dlg.get("textDir") !== "rtl") ? "rtl" : "ltr"); |
| 28 |
}; |
| 29 |
doh.register("tests._BidiSupport.form.DialogBidi", [ |
| 30 |
{ |
| 31 |
name: "Bidi Dialog test", |
| 32 |
runTest: function(){ |
| 33 |
var d = new doh.Deferred(); |
| 34 |
dlg = new Dialog({ |
| 35 |
textDir: "rtl", |
| 36 |
title: "Title!", |
| 37 |
content: "<input id='dlg1_inputA'><br>" + |
| 38 |
"<input id='dlg1_inputB'><br>" + |
| 39 |
"<input id='dlg1_inputC'><br>" + |
| 40 |
"<input type='button' value='Toggle title textDir' onclick='toggleTextDir()'>" |
| 41 |
}); |
| 42 |
dlg.show().then(d.getTestCallback(function(){ |
| 43 |
doh.is(dlg.get("textDir"), query(".dijitDialogTitle")[0].dir, "Dialog title node should have 'dir' attribute equal to dialog's 'textDir' property"); |
| 44 |
})); |
| 45 |
return d; |
| 46 |
} |
| 47 |
} |
| 48 |
]); |
| 49 |
doh.run(); |
| 50 |
}); |
| 51 |
</script> |
| 52 |
</head> |
| 53 |
<body class="claro"> |
| 54 |
<h1 class="testTitle">Bidi Dialog Test</h1> |
| 55 |
</body> |
| 56 |
</html> |
| 57 |
|
| 58 |
|