2 <script src=
"/resources/testharness.js"></script>
3 <script src=
"/resources/testharnessreport.js"></script>
6 assert_throws_js(TypeError
, () => {
7 new AppHistoryCurrentChangeEvent("currententrychange");
9 }, "can't bypass required members by omitting the dictionary entirely");
12 assert_throws_js(TypeError
, () => {
13 new AppHistoryCurrentChangeEvent("currententrychange", {
14 navigationType
: "push"
17 }, "from is required");
20 const event
= new AppHistoryCurrentChangeEvent("currententrychange", {
21 navigationType
: "replace",
22 from: navigation
.currentEntry
24 assert_equals(event
.navigationType
, "replace");
25 assert_equals(event
.from, navigation
.currentEntry
);
26 }, "all properties are reflected back");
29 const event
= new AppHistoryCurrentChangeEvent("currententrychange", { from: navigation
.currentEntry
});
30 assert_equals(event
.navigationType
, null);
31 }, "defaults are as expected");