File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
test/sanity/issue6143-mac-setProgressBar-crash Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
6
+ < title > issue6143-mac-setProgressBar-crash</ title >
7
+ </ head >
8
+ < body >
9
+ < h3 id ="result "> success</ h3 >
10
+ < script >
11
+ chrome . downloads . download ( { url : "https://github.com/nwjs/nw.js/archive/nw-v0.27.4.tar.gz" } ) ;
12
+ setInterval (
13
+ ( ) => nw . Window . get ( ) . setProgressBar ( Math . random ( ) ) // It crashes here
14
+ , 1000 ) ;
15
+ </ script >
16
+ </ body >
17
+ </ html >
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " issue6143-mac-setProgressBar-crash" ,
3
+ "main" : " index.html"
4
+ }
Original file line number Diff line number Diff line change
1
+ import time
2
+ import os
3
+ import platform
4
+ import sys
5
+
6
+ if platform .system () != 'Darwin' :
7
+ print 'Skipped for non Mac platform'
8
+ sys .exit (0 )
9
+
10
+ from selenium import webdriver
11
+ from selenium .webdriver .chrome .options import Options
12
+ chrome_options = Options ()
13
+ chrome_options .add_argument ("nwapp=" + os .path .dirname (os .path .abspath (__file__ )))
14
+
15
+ driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
16
+ driver .implicitly_wait (2 )
17
+ try :
18
+ print driver .current_url
19
+ print 'waiting for crash'
20
+ time .sleep (5 )
21
+ result = driver .find_element_by_id ('result' ).get_attribute ('innerHTML' )
22
+ print result
23
+ assert ('success' in result )
24
+ print 'There is no crash'
25
+ finally :
26
+ driver .quit ()
You can’t perform that action at this time.
0 commit comments