Commit 98ab9fb6 authored by wangmingming's avatar wangmingming

7777

parent 43dbc1cf
......@@ -58,8 +58,8 @@ for i in range(100):
t1 = time.time()
# r = requests.get('http://127.0.0.1:5000/getinfo').json()['message']
# r = requests.get('http://127.0.0.1:3001').json()
# p = subprocess.Popen(['node', 'js_dom_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'src_run1.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
p = subprocess.Popen(['node', 'js_dom_run.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
# p = subprocess.Popen(['node', 'src_run1.js', selectId], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, err = p.communicate(timeout=10)
tmp = ''
......
......@@ -27,7 +27,7 @@ var ENVS = JSON.parse(fss.readFileSync('env.json').toString())
// }
// let ENV = ENVS[process.argv[2] || keys[parseInt(Math.random() * keys.length)]]
let ENV = ENVS[process.argv[2] || 'd849c3286d37b521717482d0']
// ENV.navigatorparams.hardwareconcurrency = 20
ENV.navigatorparams.hardwareconcurrency = 4
const crypto = require('crypto');
const {proxy} = require("./jsdom/lib/jsdom/living/generated/utils");
const {randomNumberRange} = require("ghost-cursor/lib/math");
......@@ -68,8 +68,8 @@ print = console.log
dtavm.log = console.log
let con3 = console.log
let con4 = console.log
// con3 = function (){}
// con4 = function (){}
con3 = function (){}
con4 = function (){}
......@@ -458,7 +458,7 @@ navis = {
appName: ENV.navigatorparams.appname,
appVersion: ENV.navigatorparams.appversion,
language: "en-US",
languages: ['en-US', 'en', 'zh-CN'],
languages: ['en-US', 'en', 'ru'],
maxTouchPoints: 0,
platform: ENV.navigatorparams.platform,
product: ENV.navigatorparams.product,
......@@ -606,9 +606,16 @@ Object.defineProperties(Navigator.prototype, {
languages: {
get() {
v_console_log(" [*] Navigator -> languages[get]", {});
return ['en-US', 'en', 'ru']
return {}
}
},
language: {
get() {
v_console_log(" [*] Navigator -> language[get]", {});
return 'en-US'
}
},
connection: {
get() {
v_console_log(" [*] Navigator -> connection[get]", {});
......@@ -2490,7 +2497,9 @@ Object.defineProperties(CanvasRenderingContext2D.prototype, {
t.imageData = arguments;
console.log(t)
return t
}, undefined, '')
}, undefined, ''),
enumerable:true,
configurable: true
},
measureText: {
value: v_saf(function measureText() {
......@@ -2507,7 +2516,9 @@ Object.defineProperties(CanvasRenderingContext2D.prototype, {
value: v_saf(function fillText() {
v_console_log(" [*] CanvasRenderingContext2D -> fillText[func]", [].slice.call(arguments));
this.fillTextVal = arguments
}, undefined, '')
}, undefined, ''),
enumerable:true,
configurable: true
},
fillStyle: {
set: v_saf(function fillStyle() {
......@@ -2517,12 +2528,16 @@ Object.defineProperties(CanvasRenderingContext2D.prototype, {
get: v_saf(function fillStyle() {
v_console_log(" [*] CanvasRenderingContext2D -> fillStyle[get]", [].slice.call(arguments));
return this.filleStyleVal
}, undefined, 'get')
}, undefined, 'get'),
enumerable:true,
configurable: true
},
lineWidth: {
set() {
v_console_log(" [*] CanvasRenderingContext2D -> lineWidth[set]", [].slice.call(arguments));
}
},
enumerable:true,
configurable: true
},
strokeStyle: {
set: v_saf(function strokeStyle() {
......@@ -2532,12 +2547,16 @@ Object.defineProperties(CanvasRenderingContext2D.prototype, {
get: v_saf(function strokeStyle() {
v_console_log(" [*] CanvasRenderingContext2D -> strokeStyle[get]", [].slice.call(arguments));
return this._strokeStyle;
}, undefined, 'get')
}, undefined, 'get'),
enumerable:true,
configurable: true
},
textBaseline: {
set() {
v_console_log(" [*] CanvasRenderingContext2D -> textBaseline[set]", [].slice.call(arguments));
}
},
enumerable:true,
configurable: true
},
font: {
set: v_saf(function font() {
......@@ -2547,7 +2566,9 @@ Object.defineProperties(CanvasRenderingContext2D.prototype, {
get: v_saf(function font() {
v_console_log(" [*] CanvasRenderingContext2D -> font[get]", [].slice.call(arguments));
return this.fontVal
}, undefined, 'get')
}, undefined, 'get'),
enumerable:true,
configurable: true
},
shadowOffsetX: {
set() {
......@@ -4291,10 +4312,10 @@ window.innerWidth = ENV.windowparams.innerwidth;
window.outerWidth = ENV.windowparams.outerwidth;
window.innerHeight = ENV.windowparams.innerheight;
// todo
// window.innerHeight = 859
// window.innerWidth = 2560
// window.outerHeight = 970
// window.outerWidth = 2560
window.innerHeight = 859
window.innerWidth = 2560
window.outerHeight = 970
window.outerWidth = 2560
window.outerHeight = ENV.windowparams.outerheight;
window.screenLeft = 0;
......@@ -4489,14 +4510,30 @@ Object.defineProperties(Document.prototype, {
})
},
createElement: {
value: v_saf(function createElement(name) {
return _createElement(name, 'createElement')
})
value:new Proxy(function (n) {
return _createElement(n)
}, {
has(target, p) {
if (p ==='prototype'){
return false;
}
else{
return Reflect.has(target, p)
}
},
}),
configurable: true,
enumerable: true,
writable: true
},
createElementNS: {
value: v_saf(function createElementNS(name) {
return _createElement(name, 'createElementNS')
})
}),
configurable: true,
enumerable: true,
writable: true
},
featurePolicy: {
get() {
......@@ -6041,5 +6078,7 @@ let reProxy = function (tt, name) {
};
let aa = false;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment