-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).Cross-cutting test issues (use area- labels for specific failures; not used for package:test).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
This is a similar issue as dart-lang/test#2282.
Running the following code:
import 'dart:js_interop';
@JS()
external JSAny? get window;
void main() {
final w = window.open('https://www.google.com');
if (w == null) throw Exception();
w.devicePixelRatio;
}
extension on JSAny? {
external JSAny? open(String url);
external int devicePixelRatio;
}
does not result in a SecurityError
when run with tools/test.py -r chrome -c dart2js <test_path>
. devicePixelRatio
is a disallowed API on cross-origin windows. When I single-stepped the test however, the test does throw that error:
SecurityError: Failed to read a named property 'devicePixelRatio' from 'Window': Blocked a frame with origin "http://127.0.0.1:61457" from accessing a cross-origin frame.
It's possible we may need to enable same-origin policy (if possible) for this. It'd be useful to enable this so that we can run interop tests like cross_origin_test
correctly.
Metadata
Metadata
Assignees
Labels
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).Cross-cutting test issues (use area- labels for specific failures; not used for package:test).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug