diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html new file mode 100644 index 000000000..a24554e0c --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-object-element/object-handler.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>HTML Test: object - handler</title> +<link rel="author" title="Intel" href="http://www.intel.com" /> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<object id="test" name="obj" data="test0.html" type="text/html"></object> +<script> + +var t1 = async_test("The nested browsing context must be navigated to the resource specified by the data attribute."); +var t2 = async_test("The object.data must not be updated if the browsing context gets further navigated."); + +function callback(data) { + if (data == "test0") { + t1.step(function() { + var testEle = document.getElementById("test"); + assert_true(testEle.contentDocument.location.href.indexOf("test0.html") != -1, "The nested browsing context should be navigated to test0.html."); + window["obj"].history.replaceState({state:"ok"}, "mytitle ", "object-fallback.html"); + assert_not_equals(testEle.contentDocument.location.href.indexOf("object-fallback.html"), -1, "The nested browsing context should be replacement enabled."); + }); + t1.done(); + } else if (data == "test1") { + t2.step(function() { + var testEle = document.getElementById("test"); + assert_true(testEle.contentDocument.location.href.indexOf("test1.html") != -1, "The browsing context should be navigated to test1.html."); + assert_true(testEle.data.indexOf("test0.html") != -1, "The value of attribute data should not be updated."); + }); + t2.done(); + } +} + +</script> |