 Chromium Code Reviews
 Chromium Code Reviews Issue 2242743002:
  Make custom elements  work in HTML imports  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2242743002:
  Make custom elements  work in HTML imports  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html | 
| diff --git a/third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html b/third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..dd2656775f05030ed21b1b961bcf9609a1bca053 | 
| --- /dev/null | 
| +++ b/third_party/WebKit/LayoutTests/custom-elements/imports/upgrade-order.html | 
| @@ -0,0 +1,30 @@ | 
| +<!DOCTYPE html> | 
| +<script src="../../resources/testharness.js"></script> | 
| +<script src="../../resources/testharnessreport.js"></script> | 
| +<script> | 
| +'use strict'; | 
| + | 
| +let reactions = []; | 
| +</script> | 
| +<x-x id="a"></x-x> | 
| +<y-y id="x"></y-y> | 
| +<link id="import1" rel="import" href="resources/upgrade.html"> | 
| +<x-x id="b"></x-x> | 
| +<y-y id="y"></y-y> | 
| +<script> | 
| +'use strict' | 
| + | 
| +async_test((test) => { | 
| + window.onload = test.step_func_done(() => { | 
| + customElements.define('y-y', class extends HTMLElement { | 
| + constructor() { | 
| + super(); | 
| 
tkent
2016/08/24 12:07:20
wrong indentation.
 
kochi
2016/08/24 15:36:51
Done.
 | 
| + reactions.push({ type: 'constructor', element: this }); | 
| + } | 
| + }); | 
| + | 
| + let elements = reactions.map(e => e.element.id); | 
| + assert_array_equals(elements, ['a', 'aa', 'b', 'x', 'bb', 'y']); | 
| + }, 'Upgrade of custom elements should happen in document order.'); | 
| +}); | 
| +</script> |