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

Side by Side Diff: LayoutTests/fast/dom/script-tests/dataset.js

Issue 1177833006: Disable faulty test trying to defineProperty on dataset (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 6 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
« no previous file with comments | « LayoutTests/fast/dom/dataset-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description("This tests element.dataset."); 1 description("This tests element.dataset.");
2 2
3 function testGet(attr, expected) 3 function testGet(attr, expected)
4 { 4 {
5 var d = document.createElement("div"); 5 var d = document.createElement("div");
6 d.setAttribute(attr, "value"); 6 d.setAttribute(attr, "value");
7 return d.dataset[expected] == "value"; 7 return d.dataset[expected] == "value";
8 } 8 }
9 9
10 shouldBeTrue("testGet('data-foo', 'foo')"); 10 shouldBeTrue("testGet('data-foo', 'foo')");
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // that are present; check that any underlying native property 121 // that are present; check that any underlying native property
122 // is deleted instead. 122 // is deleted instead.
123 function testNativeDelete(prop, isConfigurable) 123 function testNativeDelete(prop, isConfigurable)
124 { 124 {
125 var d = document.createElement("div"); 125 var d = document.createElement("div");
126 Object.defineProperty(d.dataset, prop, {configurable: isConfigurable, value: "native_value"}); 126 Object.defineProperty(d.dataset, prop, {configurable: isConfigurable, value: "native_value"});
127 delete d.dataset[prop]; 127 delete d.dataset[prop];
128 return isConfigurable ? !(prop in d.dataset) : (d.dataset[prop] === "native_ value"); 128 return isConfigurable ? !(prop in d.dataset) : (d.dataset[prop] === "native_ value");
129 } 129 }
130 130
131 shouldBeTrue("testNativeDelete('-r-2-', false)"); 131 // TODO(jochen): Reenable this once it behaves correctly
132 //shouldBeTrue("testNativeDelete('-r-2-', false)");
132 shouldBeTrue("testNativeDelete('foo', true)"); 133 shouldBeTrue("testNativeDelete('foo', true)");
133 134
134 debug(""); 135 debug("");
135 136
136 shouldBeFalse("testDelete('dummy', '-foo')"); 137 shouldBeFalse("testDelete('dummy', '-foo')");
137 debug(""); 138 debug("");
138 139
139 function testForIn(array) 140 function testForIn(array)
140 { 141 {
141 var d = document.createElement("div"); 142 var d = document.createElement("div");
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 shouldBe("div.getAttribute('data-a-500k')", "'updated'"); 211 shouldBe("div.getAttribute('data-a-500k')", "'updated'");
211 212
212 debug(""); 213 debug("");
213 debug("Set null:"); 214 debug("Set null:");
214 215
215 var d = document.createElement("div"); 216 var d = document.createElement("div");
216 d.dataset.foo = null; 217 d.dataset.foo = null;
217 shouldBe("d.dataset.foo", "'null'"); 218 shouldBe("d.dataset.foo", "'null'");
218 219
219 debug(""); 220 debug("");
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/dataset-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698