My theory on portal's storyline / half life connection.
Note, this will ALL be under spoilers, because it conatins detailed descriptions of the following: Portal Prelude, Portal, Portal 2, and events before any of the games took place.
read at your own risk.
Part 1: 1970s to the 1980s aperture science.
From the beggining, cave johnson and his assistant caroline ran aperture science. Aperture was the rival of Black Mesa of half life. Eventualy, Cave buys millions of dollars worth of moon rocks, which he grounds into the white gel (or portal gel) and realizes that coming into contact with ground up moon rocks put powerful toxins into the blood stream. He was going to die soon, so he thought a new plan.He sent his scientists to figure out how to store an enitire human's brain, and personality onto a computer. He said that if his scientists couldn't do this before he dies, he wants them to put caroline in the computer and have her run aperture, and to do this no matter what caroline says. This came true, and after cave died, they started work on the computer that would hold caroline.
Part 2: Bring your daughter to work day / the events of portal prelude.
The construction of the robot was finished, and they had programmed the A.I for the robot, and inserted caroline's brain. They then, as a special event of bring your daughter to work day, activated the robot, which they named, GLaDOS. The robot, though had become self aware. The reason for this is (WARNING!!! This next part is ONLY based on theory, and portal prelude. This is in NO WAY official, but could possibly be. It is just a theory.) G-man, of Black Mesa, had sabotaged this robot to ruin aperture. My theory on how G-MAN sabotaged the project is that when the bring your daughter to work day was in full swing and the scientists were with their daughters and doing the activities, G-MAn snuck into the GLaDOS chamber and tampered with it. He made the "GLaDOS Core" (don't have a better name for it yet) and physically put it inside her, beyond reach. This core made GLaDOS evil, (by putting in the GLaDOS personality.) Evidence to back this up is present in portal 2, when GLaDOS says that she has heard voices all her life, and for the first time, it is her voice. My theory on this is the GLaDOS core is becoming more corrupted by the whole revelation of her being caroline. GLaDOS fludded the activity center with all of the employees and daughters, with neurotoxin. Killing everyone there, except a young chell. Chell was adopted by Doug Rattman, a schitzophranic scientist who had worked on GLaDOS, and who knew something would go wrong. He adopted chell from Cave Johnson and Caroline, so they could focus on their work, and still keep a close eye on Chell. Chell was put into hyper sleep by GLaDOS, and the other scientists tried desperatly to attach cores to GLaDOS and get her to see reason. This was to no success. All humans except Doug Rattman died. Rattman, hiding away in the facility, hacked into the mainframe, and put Chell up for next in testing, because he knew that Chell could stop GLaDOS.
Part 3: The events of Portal 1 and the fall of GLaDOS.
Chell awakens from hyper sleep for testing. She tests through each tests, sometimes finding some of the dens Rattman had used for resting places. She read his scribbles, his hints, his insane scribblings, barley readable. Eventually in the end, she takes down GLaDOS and destroys her chamber, she ends up outside but is dragged back into the facility, probably by Rattman.
Part 4: The events of Portal 2.
Chell is put into hypersleep in the Aperture Relaxation Vault for five months. She is awoken for mental rejuvination, then put back into hyper sleep. The world is evenully ravaged by the events of Half Life, and Aperture is sent into Apocalyptic Mode. All functions stop, and the test subjects STOP being awakend. Most had died, but Chell had lived, with a very minor case of serious brain damage, that is. Wheatly, a core put in charge of the test subjects, reveals everyone but her had died. Wheaty tells her that to escape, she would need the Portal Gun. She travels through a very familiar set of destroyed tests, the same from when she first tested. Eventually they make it to GLaDOS's chamber, where wheatly carelessly turns her on. GLaDOS puts them back into testing, and later they disable her Neurotoxin, and turrets. They confront her, and wheatly becomes in charge of the facility, and GLaDOS gets put into a potato. Wheatly turns evil, and they must go through Cave Johnson's old tests, and GLaDOS starts remembering her "Caroline" self. They make their ay to Wheatly, and put GLaDOS back in charge and Wheatly is sent into space. GLaDOS realizes where Caroline lives in her Artifical Intelegence, and deletes her. Chell is then released into a field with a companion cube.
Part 5: 2 different theories.
The storyline for the future could go different ways, I have added 2 theories here, which you can take sides on, depending on what you think will happen.
Theory 1: GLaDOS sent the companion cube with chell because the whole thing is a test. It's just another outside themed room in aperture. After the test, Chell will get her portal gun back, and have to go through more tests, and Portal 3 will take place.
Theory 2: Chell was released, and is now part of Half Life. She will meet up with Gordan Freeman and team up. Thus Half Life 2 episode 3, or just Half Life 3 will take place.
Remember, this is just a theory. It might not be true.