Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js

Issue 2898503002: Reenable feature policy control over fullscreen (Closed)
Patch Set: Fixing last test nits Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js
diff --git a/third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js b/third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js
index 334b23af3012e93e0c28458a3d8d2b65f6cb732e..651f2260e858505a9c6a4b02ac0850bd8c3ed50d 100644
--- a/third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js
+++ b/third_party/WebKit/LayoutTests/external/wpt_automation/fullscreen/auto-click.js
@@ -44,10 +44,17 @@ for (const button of document.getElementsByTagName('button')) {
click(button);
}
for (const iframe of document.getElementsByTagName('iframe')) {
- observe(iframe.contentDocument);
- iframe.addEventListener('load', () => {
+ try {
observe(iframe.contentDocument);
- });
+ iframe.addEventListener('load', () => {
+ observe(iframe.contentDocument);
+ });
+ } catch (e) {
+ // Skip cross-origin iframes, but report other errors
+ if (e.name != "SecurityError") {
+ throw e;
+ }
+ }
}
// Observe future changes.

Powered by Google App Engine
This is Rietveld 408576698