Skip to content

Error: infinite loop calling func from another case #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f588037
broke up the try test into individual cases
matthewkastor Dec 18, 2014
479e344
fixed typo in file name, deleted original try test
matthewkastor Dec 18, 2014
4779fa1
Error: infinite loop calling func from another case
matthewkastor Dec 31, 2014
5c0815a
removes unnecessary base url from test cases
matthewkastor Dec 31, 2014
1b2acc6
draft to add global functions
matthewkastor Jan 1, 2015
ac76002
draft 2
matthewkastor Jan 1, 2015
29e73e8
adding tests
matthewkastor Jan 1, 2015
e5a8f4e
revert selblocks.js to master
matthewkastor Jan 1, 2015
9358b32
issue fixed: functions aren't global
matthewkastor Jan 1, 2015
4ec8d62
Caching funcs from previous testCases
matthewkastor Jan 2, 2015
a7efd2f
Beginning specs for calling caseName.fn
matthewkastor Jan 2, 2015
071298b
updates test to use namespaced funcs
matthewkastor Jan 2, 2015
789c42b
reintroduces cross case bug
matthewkastor Jan 2, 2015
38c4046
adding active case property to cache
matthewkastor Jan 2, 2015
89a7571
offsetting command indexes
matthewkastor Jan 2, 2015
69d9d1c
It works!
matthewkastor Jan 2, 2015
9ac2036
removing unused function
matthewkastor Jan 2, 2015
a557cf0
Draft 1: define fn params
matthewkastor Jan 2, 2015
2226f6e
moved saving vars into doFunction
matthewkastor Jan 2, 2015
1939111
removed comment about fixed bug
matthewkastor Jan 2, 2015
5efbc6b
adds test for funcs with default values
matthewkastor Jan 2, 2015
a4f57d3
tests that default values respected
matthewkastor Jan 2, 2015
a17b481
overriding current command
matthewkastor Jan 3, 2015
64ba36e
changed test for leaking values
matthewkastor Jan 3, 2015
9df5a97
update doScript, since it's an alias to doFunction
matthewkastor Jan 3, 2015
51fd037
merging in branch "break up try test"
matthewkastor Jan 3, 2015
1fdc86c
parameters must be named to be scoped
matthewkastor Jan 3, 2015
e47b197
currentCommand should not be overridden
matthewkastor Jan 3, 2015
3b15b17
tests that "store" is not block scoped
matthewkastor Jan 3, 2015
49bf74a
Create basic test for SetLocal
matthewkastor Jan 3, 2015
baf71da
Adds local storage fns and ContextManager
matthewkastor Jan 3, 2015
6c5ed81
Updates tests
matthewkastor Jan 3, 2015
d432241
storeLocal and storeGlobal work, funcs have blocks
matthewkastor Jan 3, 2015
0062cc9
can't override doStore
matthewkastor Jan 4, 2015
e267e43
fuck it
matthewkastor Jan 4, 2015
29d1e89
Breaking change: store is block scoped
matthewkastor Jan 4, 2015
574d414
adds test for function can return value
matthewkastor Jan 4, 2015
ba85c77
pops callstack again, fn context trigger change
matthewkastor Jan 4, 2015
fbab35b
Refactor function test for local vars
matthewkastor Jan 4, 2015
3c8175d
adding block scope to loops
matthewkastor Jan 4, 2015
2c47b8e
improves return, storeEval in scope
matthewkastor Jan 4, 2015
1e7bcc1
update test for block scope
matthewkastor Jan 4, 2015
38f795b
update test for block scope
matthewkastor Jan 4, 2015
22673d0
bubbles any _result through contexts
matthewkastor Jan 4, 2015
a6dcf55
updated test
matthewkastor Jan 4, 2015
d0c2316
Adds tests for while scoping
matthewkastor Jan 4, 2015
a9ab71f
updates getEval on a few tests
matthewkastor Jan 5, 2015
b207dac
adds storeAt command and tests
matthewkastor Jan 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
340 changes: 308 additions & 32 deletions sel-blocks-fx_xpi/chrome/content/extensions/selblocks.js

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions sel-blocksTests/CallGlobalFunction.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CallGlobalFunction</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">CallGlobalFunction</td></tr>
</thead><tbody>
<tr>
<td>getEval</td>
<td>globalStoredVars.aGlobalVar = &quot;reset&quot;;</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>globalStoredVars.aGlobalVar = &quot;reset&quot;;</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>globalStoredVars.aGlobalVar = &quot;reset&quot;;</td>
<td></td>
</tr>
<tr>
<td>assertNotEval</td>
<td>globalStoredVars.aGlobalVar;</td>
<td>set</td>
</tr>
<tr>
<td>assertEval</td>
<td>globalStoredVars.aGlobalVar;</td>
<td>reset</td>
</tr>
<tr>
<td>call</td>
<td>GlobalFunctions.setGlobalVar</td>
<td></td>
</tr>
<tr>
<td>assertEval</td>
<td>globalStoredVars.aGlobalVar;</td>
<td>set</td>
</tr>
<tr>
<td>call</td>
<td>GlobalFunctions 2.doStuff</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
30 changes: 30 additions & 0 deletions sel-blocksTests/CreateGlobalVars.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CreateGlobalVars</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">CreateGlobalVars</td></tr>
</thead><tbody>
<tr>
<td>getEval</td>
<td>globalStoredVars = {};</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>globalStoredVars = {};</td>
<td></td>
</tr>
<tr>
<td>getEval</td>
<td>globalStoredVars = {};</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
81 changes: 81 additions & 0 deletions sel-blocksTests/DefineFunctionParameters - Base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://github.com/" />
<title>DefineFunctionParameters - Base</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">DefineFunctionParameters - Base</td></tr>
</thead><tbody>
<tr>
<td>store</td>
<td>original</td>
<td>x</td>
</tr>
<tr>
<td>store</td>
<td>original</td>
<td>y</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${x}&quot; === &quot;original&quot;;</td>
<td>true</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${y}&quot; === &quot;original&quot;;</td>
<td>true</td>
</tr>
<tr>
<td>function</td>
<td>bob</td>
<td>x,y</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${x}&quot; === &quot;overwritten&quot;</td>
<td>true</td>
</tr>
<tr>
<td>assertEval</td>
<td>storedVars.y === undefined</td>
<td>true</td>
</tr>
<tr>
<td>endFunction</td>
<td></td>
<td></td>
</tr>
<tr>
<td>call</td>
<td>bob</td>
<td>x=&quot;overwritten&quot;</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${x}&quot; === &quot;overwritten&quot;</td>
<td>false</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${x}&quot; === &quot;original&quot;;</td>
<td>true</td>
</tr>
<tr>
<td>assertEval</td>
<td>storedVars.y === undefined</td>
<td>false</td>
</tr>
<tr>
<td>assertEval</td>
<td>&quot;${y}&quot; === &quot;original&quot;;</td>
<td>true</td>
</tr>
</tbody></table>
</body>
</html>
Loading