Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 3ba8150

Browse files
authored
[video_player]remove integration tests (#6471)
1 parent 446c6f7 commit 3ba8150

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

packages/video_player/video_player_avfoundation/example/ios/RunnerUITests/VideoPlayerUITests.m

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -61,54 +61,4 @@ - (void)testPlayVideo {
6161
}
6262
}
6363

64-
- (void)testEncryptedVideoStream {
65-
// This is to fix a bug (https://github.com/flutter/flutter/issues/111457) in iOS 16 with blank
66-
// video for encrypted video streams.
67-
68-
NSString *tabName = @"Remote enc m3u8";
69-
70-
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"label BEGINSWITH %@", tabName];
71-
XCUIElement *unselectedTab = [self.app.staticTexts elementMatchingPredicate:predicate];
72-
XCTAssertTrue([unselectedTab waitForExistenceWithTimeout:30.0]);
73-
XCTAssertFalse(unselectedTab.isSelected);
74-
[unselectedTab tap];
75-
76-
XCUIElement *selectedTab = [self.app.otherElements
77-
elementMatchingPredicate:[NSPredicate predicateWithFormat:@"label BEGINSWITH %@", tabName]];
78-
XCTAssertTrue([selectedTab waitForExistenceWithTimeout:30.0]);
79-
XCTAssertTrue(selectedTab.isSelected);
80-
81-
// Wait until the video is loaded.
82-
[NSThread sleepForTimeInterval:60];
83-
84-
NSMutableSet *frames = [NSMutableSet set];
85-
int numberOfFrames = 60;
86-
for (int i = 0; i < numberOfFrames; i++) {
87-
UIImage *image = self.app.screenshot.image;
88-
89-
// Plugin CI does not support attaching screenshot.
90-
// Convert the image to base64 encoded string, and print it out for debugging purpose.
91-
// NSLog truncates long strings, so need to scale downn image.
92-
CGSize smallerSize = CGSizeMake(100, 200);
93-
UIGraphicsBeginImageContextWithOptions(smallerSize, NO, 0.0);
94-
[image drawInRect:CGRectMake(0, 0, smallerSize.width, smallerSize.height)];
95-
UIImage *smallerImage = UIGraphicsGetImageFromCurrentImageContext();
96-
UIGraphicsEndImageContext();
97-
98-
// 0.5 compression is good enough for debugging purpose.
99-
NSData *imageData = UIImageJPEGRepresentation(smallerImage, 0.5);
100-
NSString *imageString = [imageData base64EncodedStringWithOptions:0];
101-
NSLog(@"frame %d image data:\n%@", i, imageString);
102-
103-
[frames addObject:imageString];
104-
105-
// The sample interval must NOT be the same as video length.
106-
// Otherwise it would always result in the same frame.
107-
[NSThread sleepForTimeInterval:1];
108-
}
109-
110-
// At least 1 loading and 2 distinct frames (3 in total) to validate that the video is playing.
111-
XCTAssert(frames.count >= 3, @"Must have at least 3 distinct frames.");
112-
}
113-
11464
@end

0 commit comments

Comments
 (0)