Friend of mine died at BOS many years ago on a PanAmerican 707 freighter due to a dangerous goods fire aft, and they had to open the sliding cockpit window to try to see the instruments, the smoke was so thick
When the smoke first appeared in the cockpit it seeped through the circuit breaker panel leading the crew to believe they had an electrical fire on their hands. The F/E worked his way steadily through the specific checklist and this took some time as the checklist was designed as a trouble-shooting list.
If the crew had started an immediate descent instead of seeing if the trouble shooting would isolate which part of the electrical system was causing the smoke, the aircraft may have got on to the ground safely. It wasn't their fault but unfortunately they didn't know the smoke never was electrical in nature even though it seemed to originate from between the circuit breaker panels. As 411 stated it was a cargo hold fire of burning wood chips surrounding bottles of acid that had leaked. The local airflow through the aircraft meant the smoke came up from the cargo bay and through the CB's. The smoke which was hardly discernable at first, increased in intensity over the next few minutes and became so severe the crew could not even see the radio selections and were unable to change to required frequencies. Add to that the fact that toxic smoke can irritate eyes so badly they involuntarily shut and now things are really in the laps of the Gods.
The last item of the electrical fire trouble shooting checklist was battery switch off. I haven't flown a 707 but I gather that with landing flap down and speed brakes out, the yaw damper is inoperative with battery switch off and the aircraft becomes well nigh uncontrollable. This 707 crashed into a field while trying to reach the nearest airport.
Following the investigation into that accident, Boeing changed the checklist policy to cancel trouble shooting. This was because it was not always possible to differentiate between electrical fire and smoke and other fire and smoke sources. The long winded trouble shooting checklist caused lengthy delays when the aim should be to land as soon as possible.
When I flew for a European operator on the 737 on a short term contract in 1991, I was amazed the company still retained the original trouble shooting electrical smoke checklist - despite the revised Boeing procedure which explained why the old checklist was faulty.
When I questioned this policy I was informed in no uncertain terms that as some flights were out of sight of land, and thus landing at the nearest airport was a problem, it was decided to allow trouble shooting while en route to the nearest suitable airport.
So the long checklist was retained. This completely ignored the lesson of the fatal 707 accident which was that every second may count when smoke appears in the aircraft cockpit or cabin. And that it is vital to get on to the ground (in this case ditch on the sea) as quickly as possible because smoke could disable the crew before they could force land or ditch.