aboutsummaryrefslogtreecommitdiff
path: root/tools/reproduceriter.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-09-11 18:16:55 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-09-11 18:16:55 -0700
commit0e3266a04bff83efe418f39b9f66deec3e5c2956 (patch)
tree85d1f56bea705630df721cc5c374b58ecb6f7b03 /tools/reproduceriter.py
parent9309a720c907d268546d6048729112f98df4d639 (diff)
more dom in reproduceriter
Diffstat (limited to 'tools/reproduceriter.py')
-rwxr-xr-xtools/reproduceriter.py29
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 = {