Files
tubestation/dom/indexedDB/test/third_party_iframe2.html
Dimi Lee bf602fdf4a Bug 1652244 - P4. Fix test_third_party.html test failure r=timhuang
This testcase has:
top-level: mochi.test
1st-level: host (depend on the value in the test data)
2nd-level: mochi.test

This test run tests in the 2nd-level iframe, which is first-party with
respect to the top-level according to the new change.

The test is re-written to run tests in both 1st-level iframe and
2nd-level iframes.

Differential Revision: https://phabricator.services.mozilla.com/D86717
2020-08-12 09:11:01 +00:00

35 lines
748 B
HTML

<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<html>
<head>
<title>Indexed Database Test</title>
<script type="text/javascript">
function report(result) {
let message = { source: "iframe2" };
message.result = result;
window.parent.postMessage(JSON.stringify(message), "*");
}
function runIndexedDBTest() {
try {
let request = indexedDB.open(window.location.pathname, 1);
request.onsuccess = function(event) {
report(!!(event.target.result instanceof IDBDatabase));
};
}
catch (e) {
report(false);
}
}
</script>
</head>
<body onload="runIndexedDBTest();">
</body>
</html>