Fix tests for allow-same-origin rule introduction
Change-Id: I754aa0fb66ac1ebc1ebac1cc58d14abf29a4902c
diff --git a/Changes b/Changes
index 07b2d2c..66f0b14 100644
--- a/Changes
+++ b/Changes
@@ -8,6 +8,7 @@
- Add 'glimpse' option to query panel (diewald)
- Fix test suite for glimpse-rearrangement (diewald)
- Mark "notinindex"-fields (diewald)
+ - Fix test suite for "allow-same-origin" sandbox rule (diewald)
0.64 2026-02-14
- Improve 'Plugins' mounting (diewald)
diff --git a/dev/js/spec/pluginSpec.js b/dev/js/spec/pluginSpec.js
index e3da71e..4195fab 100644
--- a/dev/js/spec/pluginSpec.js
+++ b/dev/js/spec/pluginSpec.js
@@ -236,7 +236,7 @@
expect(p.element().querySelectorAll("iframe").length).toEqual(1);
expect(p.element().querySelectorAll("div.view.widget").length).toEqual(1);
expect(p.element().querySelectorAll("div.view.show.widget").length).toEqual(1);
- expect(p.element().querySelector("iframe").getAttribute('sandbox')).toEqual('');
+ expect(p.element().querySelector("iframe").getAttribute('sandbox')).toEqual('allow-same-origin'); // Temporary
manager.destroy();
@@ -417,7 +417,7 @@
expect(b.getAttribute("title")).toEqual("Add something");
b.click();
expect(p.element().querySelectorAll("iframe").length).toEqual(1);
- expect(p.element().querySelector("iframe").getAttribute('sandbox')).toEqual('allow-forms allow-scripts');
+ expect(p.element().querySelector("iframe").getAttribute('sandbox')).toEqual('allow-forms allow-scripts allow-same-origin'); // Temporary
});
});
@@ -447,7 +447,7 @@
var iframe = we.firstChild;
expect(iframe.tagName).toEqual("IFRAME");
- expect(iframe.getAttribute("sandbox")).toEqual("allow-forms allow-scripts");
+ expect(iframe.getAttribute("sandbox")).toEqual("allow-forms allow-scripts allow-same-origin"); // Temporary
expect(iframe.getAttribute("src")).toEqual("https://example");
expect(iframe.getAttribute("name")).toEqual("56");