File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 88 < script >
99 mytest ( 2 ) ;
1010 document . write ( '<p id="result2">' + mytest . toString ( ) + '</p>' ) ;
11+ testinner ( 2 ) ;
12+ document . write ( '<p id="result4">' + testinner . toString ( ) + '</p>' ) ;
1113 </ script >
1214</ body > </ html >
Original file line number Diff line number Diff line change 11function mytest ( a ) {
22 document . write ( "<p id='result'>" + ( a + 42 ) + "</p>" ) ;
33}
4+
5+ function testinner ( a ) {
6+ function foo ( a ) {
7+ document . write ( "<p id='result3'>" + ( a + 42 ) + "</p>" ) ;
8+ }
9+ foo ( a ) ;
10+ }
Original file line number Diff line number Diff line change 2626 out , err = proc .communicate ()
2727 print out
2828 assert ("42" not in out )
29+ assert ("foo" not in out )
2930
3031driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
3132try :
3637 assert ("44" == result .get_attribute ('innerHTML' ))
3738 result2 = driver .find_element_by_id ('result2' ).get_attribute ('innerHTML' )
3839 print result2
39- assert ("native code" in result2 )
40+ assert ("function mytest() { [native code] }" == result2 )
41+ result3 = driver .find_element_by_id ('result3' ).get_attribute ('innerHTML' )
42+ result4 = driver .find_element_by_id ('result4' ).get_attribute ('innerHTML' )
43+ assert ("44" == result3 )
44+ assert ("function testinner() { [native code] }" == result4 )
4045finally :
4146 driver .quit ()
You can’t perform that action at this time.
0 commit comments