diff --git a/gdb-port/tests/integration/test_stack_frame_parser_context.py b/gdb-port/tests/integration/test_stack_frame_parser_context.py
index 57834afa973300d7e01281a82de908c3b48ab664..44b9648c5d5265bb1deaa03fb75ccc751581df09 100644
--- a/gdb-port/tests/integration/test_stack_frame_parser_context.py
+++ b/gdb-port/tests/integration/test_stack_frame_parser_context.py
@@ -1,6 +1,6 @@
 import unittest
 
-class TestContextBasedAllocationAttribution(unittest.TestCase):
+class TestParserContextInNewStackFrames(unittest.TestCase):
 	def setUp(self):
 		self.a = Parser("a", 128)
 		self.b = Parser("b", 32)
@@ -37,13 +37,34 @@ class TestContextBasedAllocationAttribution(unittest.TestCase):
 		self.top_level_parse.enter_perform_lowlevel_parse(self.b.address)
 		self.assertIs(self.top_level_parse.peek_parser(), self.b)
 
-	# TODO: these need a different setUp() with two parsers pushed on the stack
-	def test_after_return_from_perform_lowlevel_parse(self):
-		pass
+class TestParserContextWhenReturningFromStackFrames(unittest.TestCase):
+	def setUp(self):
+		self.a = Parser("a", 128)
+		self.b = Parser("b", 32)
+		self.top_level_parse = TopLevelParse()
+		self.top_level_parse.parser_objs[32] = self.b
+		self.top_level_parse.parser_objs[128] = self.a
 
-	def test_after_return_from_parse_virtual(self):
-		pass
+		# TODO: the above two lines simulate a side effect of enter_h_do_parse. could be avoided if self.a and self.b was assigned after the calls below
+
+		self.top_level_parse.enter_h_packrat_parse(self.a.address)
+
+		#TODO: are we initializing from scratch for every test?
+		self.top_level_parse.enter_h_do_parse(400, 256, self.a.address)
+		self.top_level_parse.parse_virtual(self.a.address)
+		self.top_level_parse.enter_perform_lowlevel_parse(self.a.address)
+		self.top_level_parse.enter_h_do_parse(400, 256, self.b.address)
+		self.top_level_parse.parse_virtual(self.b.address)
+		self.top_level_parse.enter_perform_lowlevel_parse(self.b.address)
+
+	def test_after_return_from_perform_lowlevel_parse(self):
+		self.top_level_parse.return_from_perform_lowlevel_parse()
+		self.assertIs(self.top_level_parse.peek_parser(), self.b)
 
 	def test_after_return_from_h_do_parse(self):
-		#self.assertIs(self.top_level_parse.peek_parser(), ws)
-		pass
+		hps_t = gdb.lookup_type("HParseState")
+		test_parse_state = gdb.Value(b'\x00'*80, hps_t)
+
+		self.top_level_parse.return_from_perform_lowlevel_parse()
+		self.top_level_parse.return_from_h_do_parse(test_parse_state, self.b.address, 0)
+		self.assertIs(self.top_level_parse.peek_parser(), self.a)