Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: LayoutTests/fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html

Issue 14028014: Remove MicroData implementation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Also delete all the tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 test ensures that writing to itemValue must throw an INVALID_ACCESS_ERR error if the element has an itemscope attribute.</p>
9 <div id="console"></div>
10 <script>
11 var exceptionCode;
12 function runTest(tagName)
13 {
14 debug("Testing '" + tagName + "' element's behavior.");
15 exceptionCode = undefined;
16 testElement = createElement(tagName, {itemscope: 'itemscope', itemprop: 'foo ', content: 'test'});
17 try {
18 testElement.itemValue = 'test'
19 } catch (exception) {
20 exceptionCode = exception.code;
21 }
22
23 if (exceptionCode == DOMException.INVALID_ACCESS_ERR)
24 debug("TEST SUCCEEDED: Got the expected exception (" + exceptionCode + " ) INVALID_ACCESS_ERR.<br>");
25 else
26 debug("TEST FAILED: Should've thrown INVALID_ACCESS_ERR but threw " + ex ceptionCode + ".<br>");
27 }
28
29 runTest('meta');
30 runTest('audio');
31 runTest('embed');
32 runTest('iframe');
33 runTest('img');
34 runTest('source');
35 runTest('track');
36 runTest('video');
37 runTest('a');
38 runTest('area');
39 runTest('link');
40 runTest('object');
41 runTest('div');
42
43 </script>
44 <script src="../../js/resources/js-test-post.js"></script>
45 </body>
46 </html
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698