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

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

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
OLDNEW
(Empty)
1 description("Tests that accessing Attr after its Element has been destroyed work s without crashing.");
2
3 jsTestIsAsync = true;
4
5 var element = document.createElement("p");
6 element.setAttribute("a", "b");
7 var attributes = element.attributes;
8 element = null;
9 var attr = null;
10
11 asyncGC(function() {
12 shouldBe("attributes.length", "1");
13 shouldBe("attributes[0]", "attributes.item(0)");
14 shouldBe("attributes.getNamedItem('a')", "attributes.item(0)");
15
16 shouldBe("attributes.item(0).name", "'a'");
17 shouldBe("attributes.item(0).value", "'b'");
18 shouldBe("attributes.item(0).ownerElement.tagName", "'P'");
19
20 attributes.item(0).value = 'c';
21
22 shouldBe("attributes.item(0).value", "'c'");
23
24 attributes.removeNamedItem('a');
25
26 shouldBe("attributes.length", "0");
27
28 element = document.createElement("p");
29 element.setAttribute("a", "b");
30 attr = element.attributes.item(0);
31 element = null;
32
33 asyncGC(function() {
34
35 shouldBe("attr.name", "'a'");
36 shouldBe("attr.value", "'b'");
37 shouldBe("attr.ownerElement.tagName", "'P'");
38
39 attr.value = 'c';
40
41 shouldBe("attr.value", "'c'");
42
43 finishJSTest();
44 });
45 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698