b0c3bfa08096c730b9df385f9f4364a570f885d6
[WebKit-https.git] / LayoutTests / fast / dom / MicroData / itemid-must-see-resolved-url.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../js/resources/js-test-pre.js"></script>
5 <script src="resources/microdata-common.js"></script>
6 </head>
7 <body>
8 <p>This tests the itemid attribute must see the resolved itemId URL.</p>
9 <div id="console"></div>
10 <script>
11 var currentUri = location.href;
12
13 shouldBeTrue("createElement('div',{itemid:'foo'}).itemId == currentUri.substring(0, currentUri.lastIndexOf('/')) + '/foo'");
14 debug('');
15 shouldBeTrue("createElement('div',{itemid:'foo bar'}).itemId == currentUri.substring(0, currentUri.lastIndexOf('/')) + '/foo%20bar'");
16 debug('');
17
18 var element = createElement('div',{});
19 element.itemId = 'bar'
20 shouldBeTrue("element.itemId == currentUri.substring(0, currentUri.lastIndexOf('/')) + '/bar'");
21
22 var successfullyParsed = true;
23 </script>
24 <script src="../../js/resources/js-test-post.js"></script>
25 </body>
26 </html>