| Index: tools/generate-runtime-tests.py
|
| diff --git a/tools/generate-runtime-tests.py b/tools/generate-runtime-tests.py
|
| index 981d0530866459d31a8b1ef1df94609fb34fcf2a..e66686584760df970483b47bca30b1920726cd31 100755
|
| --- a/tools/generate-runtime-tests.py
|
| +++ b/tools/generate-runtime-tests.py
|
| @@ -221,7 +221,7 @@ CUSTOM_KNOWN_GOOD_INPUT = {
|
| "BreakIteratorCurrent": [_BREAK_ITERATOR, None],
|
| "BreakIteratorFirst": [_BREAK_ITERATOR, None],
|
| "BreakIteratorNext": [_BREAK_ITERATOR, None],
|
| - "CompileString": [None, "false", None],
|
| + "CompileString": [None, None, "false", None],
|
| "CreateBreakIterator": ["'en-US'", "{type: 'string'}", None, None],
|
| "CreateJSFunctionProxy": [None, "function() {}", None, None, None],
|
| "CreatePrivateSymbol": ["\"foo\"", None],
|
| @@ -698,13 +698,16 @@ class Generator(object):
|
| # TODO(jkummerow): Be more clever here?
|
| return self._Int32(name)
|
|
|
| + def _JSGlobalProxy(self, name, recursion_budget):
|
| + return self._Variable(name, "this")
|
| +
|
| def _JSObject(self, name, recursion_budget):
|
| die = random.random()
|
| if die < 0.4:
|
| function = random.choice([self._PlainObject, self._PlainArray,
|
| self._PlainFunction])
|
| elif die < 0.5:
|
| - return self._Variable(name, "this") # Global object.
|
| + return self._JSGlobalProxy(name, recursion_budget)
|
| else:
|
| function = random.choice([self._JSArrayBuffer, self._JSDataView,
|
| self._JSDate, self._JSFunctionProxy,
|
| @@ -751,6 +754,7 @@ class Generator(object):
|
| "JSFunctionProxy": ["Proxy.createFunction({}, function() {})",
|
| _JSFunctionProxy],
|
| "JSGeneratorObject": ["(function*(){ yield 1; })()", _JSGeneratorObject],
|
| + "JSGlobalProxy": ["this", _JSGlobalProxy],
|
| "JSMap": ["new Map()", _JSMap],
|
| "JSMapIterator": ["new Map().entries()", _JSMapIterator],
|
| "JSObject": ["new Object()", _JSObject],
|
|
|