Index: third_party/WebKit/LayoutTests/media/track/tracklist-is-reachable.html |
diff --git a/third_party/WebKit/LayoutTests/media/track/tracklist-is-reachable.html b/third_party/WebKit/LayoutTests/media/track/tracklist-is-reachable.html |
index 5faf0e253e44ecff1c0752e17518d4837a96183d..6e0c8ab4ae44d3fe5009372b67914b546e324dc2 100644 |
--- a/third_party/WebKit/LayoutTests/media/track/tracklist-is-reachable.html |
+++ b/third_party/WebKit/LayoutTests/media/track/tracklist-is-reachable.html |
@@ -1,49 +1,27 @@ |
<!DOCTYPE html> |
-<html> |
- <head> |
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
- |
- <script src=../media-file.js></script> |
- <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
- (Please avoid writing new tests using video-test.js) --> |
- <script src=../video-test.js></script> |
- <script> |
- |
- function forceGC() |
- { |
- if (window.GCController) |
- return GCController.collectAll(); |
- |
- // Force garbage collection |
- for (var ndx = 0; ndx < 99000; ndx++) |
- var str = new String("1234"); |
- } |
- |
- function start() |
- { |
- findMediaElement(); |
- |
- consoleWrite("** Add a custom property to a track."); |
- testExpected("video.textTracks.length", 1); |
- run("video.textTracks.myProperty = 'chicken salad!'"); |
- testExpected("video.textTracks.length", 1); |
- testExpected("video.textTracks.myProperty", "chicken salad!"); |
- |
- consoleWrite("<br>** Force garbage collection."); |
- forceGC(); |
- testExpected("video.textTracks.length", 1); |
- testExpected("video.textTracks.myProperty", "chicken salad!"); |
- |
- consoleWrite(""); |
- endTest(); |
- } |
- |
- </script> |
- </head> |
- <body onload="start()"> |
- <p>Ensure that a TrackList won't be collected if it has custom properties.</p> |
- <video> |
- <track> |
- </video> |
- </body> |
-</html> |
+<title>Ensure that a TrackList won't be collected if it has custom properties.</title> |
mlamouri (slow - plz ping)
2016/05/09 12:51:05
s/collected/garbage collected/
Srirama
2016/05/09 13:14:31
Acknowledged.
|
+<video> |
+ <track> |
+</video> |
+<script src="../../resources/gc.js"></script> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+async_test(function(t) { |
+ var video = document.querySelector("video"); |
+ |
+ assert_equals(video.textTracks.length, 1); |
+ // Add a custom property to a track. |
+ video.textTracks.myProperty = "chicken salad!"; |
+ assert_equals(video.textTracks.length, 1); |
+ assert_equals(video.textTracks.myProperty, "chicken salad!"); |
+ |
+ // Force garbage collection. |
+ gc(); |
+ |
+ setTimeout(t.step_func_done(function() { |
+ assert_equals(video.textTracks.length, 1); |
+ assert_equals(video.textTracks.myProperty, "chicken salad!"); |
+ }), 0); |
+}); |
mlamouri (slow - plz ping)
2016/05/09 12:51:05
I really don't see the point of this test... It do
Srirama
2016/05/09 13:14:31
You are right, even by removing that there is no c
mlamouri (slow - plz ping)
2016/05/10 09:08:28
I think you can delete this test. It doesn't do an
Srirama
2016/05/10 09:46:05
Done.
|
+</script> |