Skip to content
Permalink
Browse files

Update web-platform-tests to revision ad219567030d1f99f7310f52a17546b…

…57b70d29e
  • Loading branch information...
servo-wpt-sync committed Feb 15, 2019
1 parent 2c63d12 commit a7e62acbe8ddae59a2592e45b78c11e2b5dc5407
Showing with 4,156 additions and 590 deletions.
  1. +669 −71 tests/wpt/metadata/MANIFEST.json
  2. +6 −0 tests/wpt/metadata/css/cssom-view/scroll-behavior-smooth.html.ini
  3. +7 −0 tests/wpt/metadata/custom-elements/reactions/HTMLBaseElement.html.ini
  4. +21 −0 tests/wpt/metadata/domparsing/XMLSerializer-serializeToString.html.ini
  5. +9 −0 tests/wpt/metadata/fetch/sec-metadata/fetch.tentative.https.sub.html.ini
  6. +3 −0 tests/wpt/metadata/fetch/sec-metadata/script.tentative.https.sub.html.ini
  7. +3 −0 tests/wpt/metadata/fetch/sec-metadata/style.tentative.https.sub.html.ini
  8. +3 −0 tests/wpt/metadata/fetch/sec-metadata/track.tentative.https.sub.html.ini
  9. +0 −5 ...oss-documents/javascript-url-abort/javascript-url-abort-return-value-undefined.tentative.html.ini
  10. +0 −4 tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini
  11. +31 −0 .../browsers/origin/relaxing-the-same-origin-restriction/document_domain_access_details.sub.html.ini
  12. +4 −0 tests/wpt/metadata/html/browsers/the-window-object/name-attribute.window.js.ini
  13. +0 −4 tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/iframe_005.html.ini
  14. +5 −9 tests/wpt/web-platform-tests/.azure-pipelines.yml
  15. +22 −0 tests/wpt/web-platform-tests/animation-worklet/animator-animate.https.html
  16. +35 −0 tests/wpt/web-platform-tests/animation-worklet/animator-with-options.https.html
  17. +5 −1 tests/wpt/web-platform-tests/common/sleep.py
  18. +2 −2 tests/wpt/web-platform-tests/content-security-policy/securitypolicyviolation/targeting.html
  19. +140 −0 tests/wpt/web-platform-tests/css/css-position/position-absolute-dynamic-containing-block.html
  20. +54 −0 tests/wpt/web-platform-tests/css/css-values/rgba-011.html
  21. +21 −0 tests/wpt/web-platform-tests/custom-elements/reactions/HTMLBaseElement.html
  22. +7 −39 tests/wpt/web-platform-tests/custom-elements/reactions/HTMLButtonElement.html
  23. +35 −0 tests/wpt/web-platform-tests/custom-elements/reactions/resources/reactions.js
  24. +93 −0 tests/wpt/web-platform-tests/domparsing/XMLSerializer-serializeToString.html
  25. +30 −0 tests/wpt/web-platform-tests/element-timing/observe-svg-image.html
  26. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/embed.tentative.https.sub.html
  27. +47 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/fetch.tentative.https.sub.html
  28. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/font.tentative.https.sub.html
  29. +6 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/iframe.tentative.https.sub.html
  30. +6 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/iframe.tentative.sub.html
  31. +6 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/img.tentative.https.sub.html
  32. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/object.tentative.https.sub.html
  33. +3 −3 ...s/wpt/web-platform-tests/fetch/sec-metadata/redirect/cross-site-redirect.tentative.https.sub.html
  34. +1 −1 ...-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-cross-site.tentative.https.sub.html
  35. +1 −1 ...b-platform-tests/fetch/sec-metadata/redirect/multiple-redirect-same-site.tentative.https.sub.html
  36. +3 −3 .../wpt/web-platform-tests/fetch/sec-metadata/redirect/same-origin-redirect.tentative.https.sub.html
  37. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/redirect/same-site-redirect.tentative.https.sub.html
  38. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/report.tentative.https.sub.html
  39. +1 −2 tests/wpt/web-platform-tests/fetch/sec-metadata/resources/helper.js
  40. +21 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/script.tentative.https.sub.html
  41. +6 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/script.tentative.sub.html
  42. +1 −1 tests/wpt/web-platform-tests/fetch/sec-metadata/serviceworker.tentative.https.sub.html
  43. +1 −1 tests/wpt/web-platform-tests/fetch/sec-metadata/sharedworker.tentative.https.sub.html
  44. +24 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/style.tentative.https.sub.html
  45. +44 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/track.tentative.https.sub.html
  46. +12 −6 tests/wpt/web-platform-tests/fetch/sec-metadata/window-open.tentative.https.sub.html
  47. +1 −1 tests/wpt/web-platform-tests/fetch/sec-metadata/worker.tentative.https.sub.html
  48. +3 −3 tests/wpt/web-platform-tests/fetch/sec-metadata/xslt.tentative.https.sub.html
  49. +193 −0 ...html/browsers/origin/relaxing-the-same-origin-restriction/document_domain_access_details.sub.html
  50. +52 −0 ...ests/html/browsers/origin/relaxing-the-same-origin-restriction/support/document_domain_frame.html
  51. +65 −0 ...ts/html/browsers/origin/relaxing-the-same-origin-restriction/support/document_domain_frame.sub.js
  52. +18 −0 tests/wpt/web-platform-tests/html/browsers/the-window-object/name-attribute.window.js
  53. +2 −2 tests/wpt/web-platform-tests/html/semantics/text-level-semantics/the-a-element/a.rel-setter-01.html
  54. +8 −0 ...webappapis/system-state-and-capabilities/the-navigator-object/navigator_user_agent.tentative.html
  55. +21 −0 ...apis/system-state-and-capabilities/the-navigator-object/navigator_user_agent.tentative.https.html
  56. +1 −0 tests/wpt/web-platform-tests/import-maps/@std/__dir__.headers
  57. +1 −0 tests/wpt/web-platform-tests/import-maps/@std/blank
  58. +1 −0 tests/wpt/web-platform-tests/import-maps/@std/none
  59. +9 −0 tests/wpt/web-platform-tests/import-maps/README.md
  60. +31 −0 ...wpt/web-platform-tests/import-maps/acquire-import-maps-flag/dynamic-import/success.tentative.html
  61. +25 −0 tests/wpt/web-platform-tests/import-maps/acquire-import-maps-flag/script-tag/success.tentative.html
  62. +25 −0 ...wpt/web-platform-tests/import-maps/acquire-import-maps-flag/worker-request/success.tentative.html
  63. +70 −0 tests/wpt/web-platform-tests/import-maps/bare.sub.tentative.html
  64. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/__dir__.headers
  65. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/bare
  66. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/blank
  67. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/cross-origin-bare
  68. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/none
  69. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/std-blank
  70. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/std-none
  71. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/to-bare
  72. +1 −0 tests/wpt/web-platform-tests/import-maps/bare/to-data
  73. +43 −0 tests/wpt/web-platform-tests/import-maps/builtin-empty.tentative.html
  74. +27 −0 tests/wpt/web-platform-tests/import-maps/builtin-import-scheme.tentative.html
  75. +30 −0 tests/wpt/web-platform-tests/import-maps/builtin.tentative.html
  76. +72 −0 tests/wpt/web-platform-tests/import-maps/data.sub.tentative.html
  77. +79 −0 tests/wpt/web-platform-tests/import-maps/fallback-disallowed.sub.tentative.html
  78. +84 −0 tests/wpt/web-platform-tests/import-maps/fallback.sub.tentative.html
  79. +72 −0 tests/wpt/web-platform-tests/import-maps/http.sub.tentative.html
  80. +25 −0 tests/wpt/web-platform-tests/import-maps/module-map-key.tentative.html
  81. +81 −0 tests/wpt/web-platform-tests/import-maps/resolving.tentative.html
  82. 0 tests/wpt/web-platform-tests/import-maps/resources/empty.js
  83. +1 −0 tests/wpt/web-platform-tests/import-maps/resources/log.js
  84. +1 −0 tests/wpt/web-platform-tests/import-maps/resources/log.js.headers
  85. +206 −0 tests/wpt/web-platform-tests/import-maps/resources/resolving.js
  86. +205 −0 tests/wpt/web-platform-tests/import-maps/resources/test-helper.js
  87. +1 −0 tests/wpt/web-platform-tests/import-maps/static-import.js
  88. +10 −11 tests/wpt/web-platform-tests/interfaces/webxr.idl
  89. +22 −4 tests/wpt/web-platform-tests/intersection-observer/resources/intersection-observer-test-utils.js
  90. +32 −0 tests/wpt/web-platform-tests/intersection-observer/resources/v2-subframe.html
  91. +72 −0 tests/wpt/web-platform-tests/intersection-observer/v2/animated-occlusion.html
  92. +64 −0 tests/wpt/web-platform-tests/intersection-observer/v2/blur-filter.html
  93. +66 −0 tests/wpt/web-platform-tests/intersection-observer/v2/box-shadow.html
  94. +64 −0 tests/wpt/web-platform-tests/intersection-observer/v2/cross-origin-effects.sub.html
  95. +68 −0 tests/wpt/web-platform-tests/intersection-observer/v2/cross-origin-occlusion.sub.html
  96. +75 −0 tests/wpt/web-platform-tests/intersection-observer/v2/delay-test.html
  97. +44 −0 tests/wpt/web-platform-tests/intersection-observer/v2/iframe-target.html
  98. +71 −0 tests/wpt/web-platform-tests/intersection-observer/v2/simple-effects.html
  99. +70 −0 tests/wpt/web-platform-tests/intersection-observer/v2/simple-occlusion-svg-foreign-object.html
  100. +66 −0 tests/wpt/web-platform-tests/intersection-observer/v2/simple-occlusion.html
  101. +69 −0 tests/wpt/web-platform-tests/intersection-observer/v2/text-shadow.html
  102. +39 −0 tests/wpt/web-platform-tests/layout-stability/buffer-layout-jank.html
  103. +34 −0 tests/wpt/web-platform-tests/layout-stability/observe-layoutjank.html
  104. +6 −0 tests/wpt/web-platform-tests/layout-stability/resources/slow-image.py
  105. +17 −0 tests/wpt/web-platform-tests/layout-stability/supported-layout-type.html
  106. +1 −0 tests/wpt/web-platform-tests/lint.whitelist
  107. +8 −3 tests/wpt/web-platform-tests/payment-method-basic-card/empty-data-manual.https.html
  108. +1 −1 ...wpt/web-platform-tests/payment-method-basic-card/payment-request-canmakepayment-method.https.html
  109. +1 −0 tests/wpt/web-platform-tests/payment-request/META.yml
  110. +0 −95 tests/wpt/web-platform-tests/payment-request/payment-request-abort-method-manual.https.html
  111. +40 −0 tests/wpt/web-platform-tests/payment-request/payment-request-abort-method.https.html
  112. +0 −105 tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method-manual.https.html
  113. +35 −0 tests/wpt/web-platform-tests/payment-request/payment-request-canmakepayment-method.https.html
  114. +0 −51 ...web-platform-tests/payment-request/payment-request-hasenrolledinstrument-method-manual.https.html
  115. +40 −1 tests/wpt/web-platform-tests/payment-request/payment-request-hasenrolledinstrument-method.https.html
  116. +1 −90 tests/wpt/web-platform-tests/payment-request/rejects_if_not_active.https.html
  117. +164 −0 tests/wpt/web-platform-tests/payment-request/rejects_if_not_active_manual.https.html
  118. +3 −1 tests/wpt/web-platform-tests/picture-in-picture/disable-picture-in-picture.html
  119. +14 −0 tests/wpt/web-platform-tests/screen-orientation/lock-basic.html
  120. +8 −0 tests/wpt/web-platform-tests/screen-orientation/onchange-event.html
  121. +8 −7 .../web-platform-tests/service-workers/service-worker/postmessage-to-client-message-queue.https.html
  122. +3 −0 tests/wpt/web-platform-tests/signed-exchange/resources/generate-test-sxgs.sh
  123. BIN tests/wpt/web-platform-tests/signed-exchange/resources/sxg/sxg-merkle-integrity-error.sxg
  124. +24 −0 tests/wpt/web-platform-tests/signed-exchange/sxg-merkle-integrity-error.tentative.html
  125. +26 −0 tests/wpt/web-platform-tests/signed-exchange/sxg-prefetch-merkle-integrity-error.tentative.html
  126. +2 −2 tests/wpt/web-platform-tests/tools/wpt/browser.py
  127. +14 −11 tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executormarionette.py
  128. +2 −9 tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py
  129. +7 −1 tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/testrunner.py

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -3,3 +3,9 @@
[scroll-behavior: smooth on DIV element]
expected: FAIL

[Smooth scrolling while doing history navigation.]
expected: FAIL

[Instant scrolling while doing history navigation.]
expected: FAIL

@@ -0,0 +1,7 @@
[HTMLBaseElement.html]
[target on HTMLBaseElement must enqueue an attributeChanged reaction when adding a new attribute]
expected: FAIL

[target on HTMLBaseElement must enqueue an attributeChanged reaction when replacing an existing attribute]
expected: FAIL

@@ -27,3 +27,24 @@
[Check if attribute serialization takes into account of the same prefix declared in an ancestor element]
expected: FAIL

[Check if the prefix of an attribute is replaced with another existing prefix mapped to the same namespace URI.]
expected: FAIL

[Check if inconsistent xmlns="..." is dropped.]
expected: FAIL

[Check if an attribute with namespace and no prefix is serialized with the nearest-declared prefix]
expected: FAIL

[Check if no special handling for XLink namespace unlike HTML serializer.]
expected: FAIL

[Check if the prefix of an attribute is NOT preserved in a case where neither its prefix nor its namespace URI is not already used.]
expected: FAIL

[Check if the prefix of an attribute is replaced with a generated one in a case where the prefix is already mapped to a different namespace URI.]
expected: FAIL

[Check if an attribute with namespace and no prefix is serialized with the nearest-declared prefix even if the prefix is assigned to another namespace.]
expected: FAIL

@@ -8,3 +8,12 @@
[Cross-site fetch]
expected: FAIL

[Same-origin mode]
expected: FAIL

[no-CORS mode]
expected: FAIL

[CORS mode]
expected: FAIL

@@ -8,3 +8,6 @@
[Cross-site script]
expected: FAIL

[Same-origin CORS script]
expected: FAIL

@@ -8,3 +8,6 @@
[Same-Origin style]
expected: FAIL

[Same-Origin, cors style]
expected: FAIL

@@ -9,3 +9,6 @@
[Cross-Site track]
expected: NOTRUN

[Same-Origin, CORS track]
expected: NOTRUN

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,31 @@
[document_domain_access_details.sub.html]
[Access allowed if same-origin with no 'document.domain' modification. (Sanity check)]
expected: FAIL

[Access is revoked to Window object when we stop being same effective script origin due to document.domain.]
expected: FAIL

[Access allowed if different-origin but both set document.domain to parent domain.]
expected: FAIL

[Access is not revoked to random object when we stop being same effective script origin due to document.domain.]
expected: FAIL

[Access not allowed if different-origin with no 'document.domain' modification. (Sanity check)]
expected: FAIL

[Access disallowed again if same-origin, both set document-domain to existing value, then one sets to parent.]
expected: FAIL

[Access is revoked to Location object when we stop being same effective script origin due to document.domain.]
expected: FAIL

[Access allowed if same-origin and both set document.domain to existing value.]
expected: FAIL

[Access is not revoked to Document object when we stop being same effective script origin due to document.domain.]
expected: FAIL

[Access disallowed if same-origin but only one sets document.domain.]
expected: FAIL

@@ -0,0 +1,4 @@
[name-attribute.window.html]
[Window object's name IDL attribute]
expected: FAIL

This file was deleted.

Oops, something went wrong.
@@ -214,15 +214,11 @@ jobs:
- job: all_post
displayName: 'all tests (wpt.fyi hook)'
dependsOn: all_macOS
pool: server
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: InvokeRESTAPI@1
- script: curl -s -S https://wpt.fyi/api/checks/azure/$(Build.BuildId)
displayName: 'Invoke wpt.fyi hook'
inputs:
serviceConnection: wpt.fyi
urlSuffix: /api/checks/azure/$(Build.BuildId)
- task: InvokeRESTAPI@1
- script: curl -s -S https://staging.wpt.fyi/api/checks/azure/$(Build.BuildId)
displayName: 'Invoke staging.wpt.fyi hook'
inputs:
serviceConnection: staging.wpt.fyi
urlSuffix: /api/checks/azure/$(Build.BuildId)
condition: succeededOrFailed()
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<title>Basic use of Worklet Animation</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>

<div id="target"></div>

<script>
promise_test(async t => {
await registerConstantLocalTimeAnimator(500);
const effect = new KeyframeEffect(target, [{ opacity: 0 }], { duration: 1000 });
const animation = new WorkletAnimation('constant_time', effect);
animation.play();
await waitForAsyncAnimationFrames(1);
assert_equals(getComputedStyle(target).opacity, "0.5");
}, "Simple worklet animation should output values at specified local time");
</script>
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<title>Worklet Animation with options</title>
<link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/web-animations/testcommon.js"></script>
<script src="common.js"></script>

<div id="target"></div>

<script id="animate_with_options" type="text/worklet">
registerAnimator("test_animator", class {
constructor(options) {
this.time_ = options.time;
}
animate(currentTime, effect) {
effect.localTime = this.time_;
}
});
</script>

<script>
promise_test(async t => {
await runInAnimationWorklet(document.getElementById('animate_with_options').textContent);
const target = document.getElementById('target');
const effect = new KeyframeEffect(target, [{ opacity: 0 }], { duration: 1000 });
const options = {'time': 500};
const animation = new WorkletAnimation('test_animator', effect, document.timeline, options);
animation.play();
await waitForAsyncAnimationFrames(1);
assert_equals(getComputedStyle(target).opacity, "0.5");
}, "Animator should be able to use options to update the animation");
</script>
@@ -5,4 +5,8 @@
sleep_padding = 15.0

def sleep_at_least(sleep_in_ms):
time.sleep((sleep_in_ms + sleep_padding) / 1E3);
sleep_until = time.time() + (sleep_in_ms / 1E3)
time.sleep((sleep_in_ms + sleep_padding) / 1E3)
# Check if the padding was sufficient; if not, sleep again.
while time.time() < sleep_until:
time.sleep(sleep_padding / 1E3)
@@ -36,7 +36,7 @@
.then(t.step_func(e => {
assert_equals(e.blockedURI, "inline");
assert_equals(e.lineNumber, 118);
assert_equals(e.columnNumber, 4);
assert_in_array(e.columnNumber, [4, 6]);
assert_equals(e.target, document, "Elements created in this document, but pushed into a same-origin frame trigger on that frame's document, not on this frame's document.");
return watcher.wait_for('securitypolicyviolation');
}))
@@ -50,7 +50,7 @@
.then(t.step_func(e => {
assert_equals(e.blockedURI, "inline");
assert_equals(e.lineNumber, 139);
assert_equals(e.columnNumber, 4);
assert_in_array(e.columnNumber, [4, 6]);
assert_equals(e.target, document, "Inline event handlers for disconnected elements target the document.");
return watcher.wait_for('securitypolicyviolation');
}))
@@ -0,0 +1,140 @@
<!DOCTYPE html>
<title>CSS Position: position:absolute dynamic containing block</title>
<link rel="author" title="mailto:atotic@google.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://drafts.csswg.org/css-position-3/#def-cb">
<meta name="assert" content="Tests changes in containing block for out-of-flow positioned descendants.">
<style>
#outer {
width: 400px;
height: 300px;
outline: black solid 1px;
}
#intermediate {
width: 300px;
height: 200px;
outline: gray solid 1px;
}
#target {
background: green;
}
.abs {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.fixed {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.abs-container {
position: relative;
}
.fixed-container {
will-change: transform;
}
div {
padding: 5px;
}
</style>
<!-- This tests potential caching of out-of-flow positioned descendants. -->
<div id="outer">
<div>
<div id="intermediate">
<div>
<div id="target">TTT</div>
<div id="noLayout1"></div>
</div>
<div id="noLayout2"></div>
</div>
</div>
</div>
<script>
let outer = document.querySelector("#outer");
let intermediate = document.querySelector("#intermediate");
let target = document.querySelector("#target");
let padding = 5;
function cleanup() {
outer.className = "";
intermediate.className = "";
target.className = "";
document.body.offsetTop;
}
test( t => {
t.add_cleanup(cleanup);
outer.classList.add("abs-container");
target.classList.add("abs");
assert_equals(target.offsetHeight, outer.offsetHeight);
intermediate.classList.add("abs-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
}, "abs containing block moves from outer to intermediate" );
test( t => {
t.add_cleanup(cleanup);
target.classList.add("abs");
intermediate.classList.add("abs-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
outer.classList.add("abs-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
intermediate.classList.remove("abs-container");
assert_equals(target.offsetHeight, outer.offsetHeight);
}, "abs containing block moves from intermediate to outer" );
test( t => {
t.add_cleanup(cleanup);
target.classList.add("abs");
outer.classList.add("abs-container");
assert_equals(target.offsetHeight, outer.offsetHeight);
target.classList.remove("abs");
assert_equals(target.offsetWidth, intermediate.offsetWidth - 4 * padding);
}, "target is no longer absolute");
test( t => {
t.add_cleanup(cleanup);
outer.classList.add("abs-container");
assert_equals(target.offsetWidth, intermediate.offsetWidth - 4 * padding);
target.classList.add("abs");
assert_equals(target.offsetHeight, outer.offsetHeight);
}, "target becomes absolute");
// Repeat same tests with fixed
test( t => {
t.add_cleanup(cleanup);
outer.classList.add("fixed-container");
target.classList.add("fixed");
assert_equals(target.offsetHeight, outer.offsetHeight);
intermediate.classList.add("fixed-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
}, "fixed containing block moves from outer to intermediate" );
test( t => {
t.add_cleanup(cleanup);
target.classList.add("fixed");
intermediate.classList.add("fixed-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
outer.classList.add("fixed-container");
assert_equals(target.offsetHeight, intermediate.offsetHeight);
intermediate.classList.remove("fixed-container");
assert_equals(target.offsetHeight, outer.offsetHeight);
}, "fixed containing block moves from intermediate to outer" );
test( t => {
t.add_cleanup(cleanup);
target.classList.add("fixed");
outer.classList.add("fixed-container");
assert_equals(target.offsetHeight, outer.offsetHeight);
target.classList.remove("fixed");
assert_equals(target.offsetWidth, intermediate.offsetWidth - 4 * padding);
}, "target is no longer fixed");
test( t => {
t.add_cleanup(cleanup);
outer.classList.add("fixed-container");
assert_equals(target.offsetWidth, intermediate.offsetWidth - 4 * padding);
target.classList.add("fixed");
assert_equals(target.offsetHeight, outer.offsetHeight);
}, "target becomes fixed");
</script>
Oops, something went wrong.

0 comments on commit a7e62ac

Please sign in to comment.
You can’t perform that action at this time.