Chromium Code Reviews| Index: LayoutTests/http/tests/htmlimports/import-dup-custom-element.html |
| diff --git a/LayoutTests/http/tests/htmlimports/import-dup-custom-element.html b/LayoutTests/http/tests/htmlimports/import-dup-custom-element.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..31e44593f12098ca46dd558e61ac33456455c3fc |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/htmlimports/import-dup-custom-element.html |
| @@ -0,0 +1,48 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="../../../resources/testharness.js"></script> |
| +<script src="../../../resources/testharnessreport.js"></script> |
| +<script> |
| +var records = []; |
| + |
| +function addRecord(str) |
| +{ |
| + console.log(str); |
| + records.push(str); |
| +} |
| + |
| +function recordElement(element) |
| +{ |
| + addRecord(element.tagName + ":" + element.id); |
| +} |
| +</script> |
| +<my-custom id="using-toplevel-1"></my-custom> |
| +<!-- |
| + -- |using-custom-element-1.html| reaches |def-custom-element.html| with one indirection |
|
dominicc (has gone to gerrit)
2014/04/18 00:56:25
in direction -> indirection?
dominicc (has gone to gerrit)
2014/04/18 00:56:25
I'm not crazy about the -- prefixes. Just left ali
Hajime Morrita
2014/04/18 01:48:33
Rietveld wraps it badly. The real code doesn't hav
Hajime Morrita
2014/04/18 01:48:33
Done.
|
| + -- while |using-custom-element-2.html| imports it directly. |
| + -- So |using-custom-element-2.html| triggers importing |def-custom-element.html| and |
| + -- |using-custom-element-1.html| finds it and de-dups later. |
| + --> |
| +<link rel="import" href="resources/using-custom-element-1.html"> |
| +<link rel="import" href="resources/using-custom-element-2.html"> |
| +<my-custom id="using-toplevel-2"></my-custom> |
| +</head> |
| +<body> |
| +<script> |
| +test(function () { |
| + assert_array_equals(records, ['MY-CUSTOM:using-toplevel-1', |
| + 'MY-CUSTOM:using-1-before', |
| + 'MY-CUSTOM:pointing-before', |
| + 'MY-CUSTOM:def-before', |
| + 'MY-CUSTOM:def-after', |
| + 'MY-CUSTOM:pointing-after', |
| + 'MY-CUSTOM:using-1-after', |
| + 'MY-CUSTOM:using-2-before', |
| + 'MY-CUSTOM:using-2-after', |
| + 'MY-CUSTOM:using-toplevel-2'], |
| + 'Custom Element invocations preserve tree order across imports'); |
| +}, 'Custom Element invocations preserve tree order across imports regardless the loading order.'); |
| +</script> |
| +</body> |
| +</html> |