diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-11 18:16:55 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-11 18:16:55 -0700 |
commit | 0e3266a04bff83efe418f39b9f66deec3e5c2956 (patch) | |
tree | 85d1f56bea705630df721cc5c374b58ecb6f7b03 /tools/reproduceriter.py | |
parent | 9309a720c907d268546d6048729112f98df4d639 (diff) |
more dom in reproduceriter
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-x | tools/reproduceriter.py | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/tools/reproduceriter.py b/tools/reproduceriter.py index e06cdc72..6696915d 100755 --- a/tools/reproduceriter.py +++ b/tools/reproduceriter.py @@ -148,7 +148,34 @@ if (typeof nagivator == 'undefined') { }; var document = { getElementById: function(id) { - return null; + switch(id) { + case 'canvas': { + return { + getContext: function(which) { + switch(which) { + case 'experimental-webgl': { + return { + getExtension: function() { return 1 }, + requestPointerLock: function() { + throw 'pointerLock'; + }, + }; + } + default: throw 'canvas.getContext: ' + which; + } + }, + }; + } + default: throw 'getElementById: ' + id; + } + }, + querySelector: function() { + return { + classList: { + add: function(){}, + remove: function(){}, + }, + }; }, }; var performance = { |