File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
html/browsers/windows/consume-user-activation Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 15
15
testWin . close ( ) ;
16
16
} ) ;
17
17
assert_false ( navigator . userActivation . isActive , "User activation should be consumed" ) ;
18
- } ) ;
18
+ } , "Opening a new window should consume user activation" ) ;
19
+
20
+ promise_test ( async function ( t ) {
21
+ await test_driver . bless ( "user activation" ) ;
22
+ const testWin = window . open ( "/resources/blank.html" , "testWindow" ) ;
23
+ assert_false ( navigator . userActivation . isActive , "User activation should be consumed" ) ;
24
+ t . add_cleanup ( ( ) => {
25
+ testWin . close ( ) ;
26
+ } ) ;
27
+
28
+ // Open the existing window again
29
+ await test_driver . bless ( "user activation" ) ;
30
+ const testWin2 = window . open ( "/resources/blank.html" , "testWindow" ) ;
31
+ assert_true ( navigator . userActivation . isActive , "User activation should not be consumed" ) ;
32
+ } , "Opening an existing window should not consume user activation" ) ;
19
33
</ script >
You can’t perform that action at this time.
0 commit comments