Opened 7 years ago

Closed 7 years ago

#15613 closed defect (fixed)

DOH's console.debug workaround for Safari 3 also triggers on other browsers.

Reported by: gualandi Owned by: bill
Priority: undecided Milestone: 1.8
Component: TestFramework Version: 1.7.3
Keywords: Cc:
Blocked By: Blocking:

Description

The following code in util/doh/runner.html

// workaround for bug in Safari 3.  See #7189 
if (/3[\.0-9]+ Safari/.test(navigator.appVersion)){
	window.console = {
		origConsole: window.console,
		log: function(s){
			this.origConsole.log(s);
		},
		info: function(s){
			this.origConsole.info(s);
		},
		error: function(s){
			this.origConsole.error(s);
		},
		warn: function(s){
			this.origConsole.warn(s);
		}
	};
}

also recognizes my recent version of Google Chrome:

> navigator.appVersion
"5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11"
> navigator.appVersion.match(/3[\.0-9]+ Safari/)
["32.47 Safari"]
> (/3[\.0-9]+ Safari/).test(navigator.appVersion)
true

This is annoying since the native console object ends up being overwritten even though it doesn't need to. We should use a more specific test instead.

Change History (2)

comment:1 Changed 7 years ago by bill

Component: CoreTestFramework
Milestone: tbd1.8
Owner: set to bill
Status: newassigned

I'll just remove that code; we don't need it anymore.

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29130]:

Remove vestigial code. Safari has it's own console now and doesn't use firebug lite anymore. Fixes #15613, refs #7189.

Note: See TracTickets for help on using tickets.