Implement cases for load and unload events in IsExpected.