mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 754278 - Support floats in executeScript arguments, r=jgriffin, DONTBUILD because NPOTB
This commit is contained in:
parent
56e49c1b75
commit
37c8d1d890
@ -295,7 +295,7 @@ class Marionette(object):
|
||||
elif type(args) == HTMLElement:
|
||||
wrapped = {'ELEMENT': args.id }
|
||||
elif (isinstance(args, bool) or isinstance(args, basestring) or
|
||||
isinstance(args, int) or args is None):
|
||||
isinstance(args, int) or isinstance(args, float) or args is None):
|
||||
wrapped = args
|
||||
|
||||
return wrapped
|
||||
|
@ -75,6 +75,13 @@ let prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
self.marionette.execute_script("global.barfoo = [42, 23];")
|
||||
self.assertEqual(self.marionette.execute_script("return global.barfoo;", new_sandbox=False), [42, 23])
|
||||
|
||||
def test_that_we_can_pass_in_floats(self):
|
||||
expected_result = 1.2
|
||||
result = self.marionette.execute_script("return arguments[0]",
|
||||
[expected_result])
|
||||
self.assertTrue(isinstance(result, float))
|
||||
self.assertEqual(result, expected_result)
|
||||
|
||||
class TestExecuteChrome(TestExecuteContent):
|
||||
def setUp(self):
|
||||
super(TestExecuteChrome, self).setUp()
|
||||
|
Loading…
Reference in New Issue
Block a user