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 8
8
< script >
9
9
mytest ( 2 ) ;
10
10
document . write ( '<p id="result2">' + mytest . toString ( ) + '</p>' ) ;
11
+ testinner ( 2 ) ;
12
+ document . write ( '<p id="result4">' + testinner . toString ( ) + '</p>' ) ;
11
13
</ script >
12
14
</ body > </ html >
Original file line number Diff line number Diff line change 1
1
function mytest ( a ) {
2
2
document . write ( "<p id='result'>" + ( a + 42 ) + "</p>" ) ;
3
3
}
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 26
26
out , err = proc .communicate ()
27
27
print out
28
28
assert ("42" not in out )
29
+ assert ("foo" not in out )
29
30
30
31
driver = webdriver .Chrome (executable_path = os .environ ['CHROMEDRIVER' ], chrome_options = chrome_options )
31
32
try :
36
37
assert ("44" == result .get_attribute ('innerHTML' ))
37
38
result2 = driver .find_element_by_id ('result2' ).get_attribute ('innerHTML' )
38
39
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 )
40
45
finally :
41
46
driver .quit ()
You can’t perform that action at this time.
0 commit comments