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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Attr/access-after-element-destruction.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <script src="script-tests/access-after-element-destruction.js"></script> 7 <script>
8 description("Tests that accessing Attr after its Element has been destroyed work s without crashing.");
9
10 jsTestIsAsync = true;
11
12 var element = document.createElement("p");
13 element.setAttribute("a", "b");
14 var attributes = element.attributes;
15 element = null;
16 var attr = null;
17
18 asyncGC(function() {
19 shouldBe("attributes.length", "1");
20 shouldBe("attributes[0]", "attributes.item(0)");
21 shouldBe("attributes.getNamedItem('a')", "attributes.item(0)");
22
23 shouldBe("attributes.item(0).name", "'a'");
24 shouldBe("attributes.item(0).value", "'b'");
25 shouldBe("attributes.item(0).ownerElement.tagName", "'P'");
26
27 attributes.item(0).value = 'c';
28
29 shouldBe("attributes.item(0).value", "'c'");
30
31 attributes.removeNamedItem('a');
32
33 shouldBe("attributes.length", "0");
34
35 element = document.createElement("p");
36 element.setAttribute("a", "b");
37 attr = element.attributes.item(0);
38 element = null;
39
40 asyncGC(function() {
41
42 shouldBe("attr.name", "'a'");
43 shouldBe("attr.value", "'b'");
44 shouldBe("attr.ownerElement.tagName", "'P'");
45
46 attr.value = 'c';
47
48 shouldBe("attr.value", "'c'");
49
50 finishJSTest();
51 });
52 });
53 </script>
8 </body> 54 </body>
9 </html> 55 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/Attr/script-tests/TEMPLATE.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698