Changeset 109309 in webkit
- Timestamp:
- Feb 29, 2012 9:57:05 PM (12 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109306 r109309 1 2012-02-29 Shinya Kawanaka <shinyak@chromium.org> 2 3 createContentWithSelect in shadow-test-driver.js is not intuitive. 4 https://bugs.webkit.org/show_bug.cgi?id=80002 5 6 Reviewed by Hajime Morita. 7 8 createContentWithSelect takes an agument 'fallback', but it used to create a text node 9 if the argument is missing. This is not intuitive at all. 10 11 This patch changes the createContentWithSelect behavior to make it intuitive. 12 13 * fast/dom/resources/shadow-test-driver.js: 14 (createContentWithSelect): 15 * fast/dom/shadow/content-element-move.html: 16 1 17 2012-02-29 Erik Arvidsson <arv@chromium.org> 2 18 -
trunk/LayoutTests/fast/dom/resources/shadow-test-driver.js
r109096 r109309 62 62 } 63 63 64 function createContentWithSelect(select, fallback ) {64 function createContentWithSelect(select, fallbackText) { 65 65 var content = internals.createContentElement(document); 66 66 content.setAttribute('select', select); 67 if ( !fallback)68 content.appendChild(createSpanWithText( "FALLBACK"));67 if (fallbackText) 68 content.appendChild(createSpanWithText(fallbackText)); 69 69 70 70 return content; -
trunk/LayoutTests/fast/dom/shadow/content-element-move.html
r106619 r109309 23 23 24 24 // Create shadow tree. 25 var content = createContentWithSelect('span' );25 var content = createContentWithSelect('span', 'FALLBACK'); 26 26 var sr = internals.ensureShadowRoot(root); 27 27 sr.appendChild(createSpanWithText("BEFORE")); … … 49 49 50 50 // Create shadow tree. 51 var content1 = createContentWithSelect('.c1' );52 var content2 = createContentWithSelect('span' );51 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 52 var content2 = createContentWithSelect('span', 'FALLBACK'); 53 53 var sr = internals.ensureShadowRoot(root); 54 54 sr.appendChild(createSpanWithText("BEFORE")); … … 78 78 79 79 // Create shadow tree. 80 var content1 = createContentWithSelect('.c1' );81 var content2 = createContentWithSelect('span' );80 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 81 var content2 = createContentWithSelect('span', 'FALLBACK'); 82 82 var sr = internals.ensureShadowRoot(root); 83 83 sr.appendChild(createSpanWithText("BEFORE")); … … 134 134 135 135 // Create shadow tree. 136 var content = createContentWithSelect('span' );136 var content = createContentWithSelect('span', 'FALLBACK'); 137 137 var sr = internals.ensureShadowRoot(root); 138 138 sr.appendChild(createSpanWithText("BEFORE")); … … 160 160 161 161 // Create shadow tree. 162 var content = createContentWithSelect('span' );162 var content = createContentWithSelect('span', 'FALLBACK'); 163 163 var sr = internals.ensureShadowRoot(root); 164 164 sr.appendChild(createSpanWithText("BEFORE")); … … 187 187 188 188 // Create shadow tree. 189 var content = createContentWithSelect('.c1' );189 var content = createContentWithSelect('.c1', 'FALLBACK'); 190 190 var sr = internals.ensureShadowRoot(root); 191 191 sr.appendChild(createSpanWithText("BEFORE")); … … 222 222 var f = (function(root, callIfDone) { 223 223 return function() { 224 var content = createContentWithSelect('span' );224 var content = createContentWithSelect('span', 'FALLBACK'); 225 225 var sr = internals.ensureShadowRoot(root); 226 226 sr.insertBefore(content, sr.lastChild); … … 248 248 var f = (function(root, callIfDone) { 249 249 return function() { 250 var content1 = createContentWithSelect('.c2' );251 var content2 = createContentWithSelect('span' );250 var content1 = createContentWithSelect('.c2', 'FALLBACK'); 251 var content2 = createContentWithSelect('span', 'FALLBACK'); 252 252 var sr = internals.ensureShadowRoot(root); 253 253 sr.insertBefore(content1, sr.lastChild); … … 272 272 sr.appendChild(createSpanWithText("BEFORE")); 273 273 sr.appendChild(mid); 274 sr.appendChild(createContentWithSelect('.c2' ));274 sr.appendChild(createContentWithSelect('.c2', 'FALLBACK')); 275 275 sr.appendChild(createSpanWithText("AFTER")); 276 276 … … 279 279 var f = (function(root, mid, callIfDone) { 280 280 return function() { 281 var content = createContentWithSelect('span' );281 var content = createContentWithSelect('span', 'FALLBACK'); 282 282 var sr = internals.ensureShadowRoot(root); 283 283 sr.insertBefore(content, mid); … … 299 299 // Create shadow tree. 300 300 var sr = internals.ensureShadowRoot(root); 301 var content1 = createContentWithSelect('.c1' );302 var content2 = createContentWithSelect('span' );301 var content1 = createContentWithSelect('.c1', 'FALLBACK'); 302 var content2 = createContentWithSelect('span', 'FALLBACK'); 303 303 sr.appendChild(createSpanWithText("BEFORE")); 304 304 sr.appendChild(content1); … … 337 337 // Create shadow tree in 'n1' 338 338 var sr = internals.ensureShadowRoot(n1); 339 var content = createContentWithSelect('span' );339 var content = createContentWithSelect('span', 'FALLBACK'); 340 340 sr.appendChild(createSpanWithText("BEFORE")); 341 341 sr.appendChild(content);
Note: See TracChangeset
for help on using the changeset viewer.