Bug 1077294 - remove NETWORK_LOADED from the test cases. r=jwwang
authorKilik Kuo <kikuo@mozilla.com>
Mon, 08 Aug 2016 15:27:14 +0800
changeset 398687 66dba48bdc32ddc950ff8910eda64aba75bf79e8
parent 398686 99f20b0c58d01780b427936cc216403535e6b46c
child 398688 dbcad237aa05b3514260b2fdcb7600b56659ce9c
push id25600
push userbmo:tchiovoloni@mozilla.com
push dateTue, 09 Aug 2016 16:33:05 +0000
reviewersjwwang
bugs1077294
milestone51.0a1
Bug 1077294 - remove NETWORK_LOADED from the test cases. r=jwwang MozReview-Commit-ID: 7tvTT7DVSqH
dom/media/test/test_playback.html
dom/media/test/test_playback_reactivate.html
--- a/dom/media/test/test_playback.html
+++ b/dom/media/test/test_playback.html
@@ -58,17 +58,17 @@ function startTest(test, token) {
       finish();
     }
   }
 
   var checkEnded = function(test, v) { return function() {
     is(test.name, v.name, test.name + ": Name should match #2");
     checkMetadata(test.name, v, test);
     is(v.readyState, v.HAVE_CURRENT_DATA, test.name + " checking readyState");
-    ok(v.readyState != v.NETWORK_LOADED, test.name + " shouldn't report NETWORK_LOADED");
+    is(v.networkState, v.NETWORK_IDLE, test.name + " checking networkState");
     ok(v.ended, test.name + " checking playback has ended");
     ok(!v.finished, test.name + " shouldn't be finished");
     ok(!v.seenEnded, test.name + " shouldn't be ended");
 
     v.seenEnded = true;
     mayFinish();
   }}(test, v);
 
--- a/dom/media/test/test_playback_reactivate.html
+++ b/dom/media/test/test_playback_reactivate.html
@@ -58,17 +58,17 @@ function startTest(test, token) {
     removeNodeAndSource(v);
     manager.finished(v.token);
   }
 
   var checkEnded = function(test, v) { return function() {
     is(test.name, v.name, test.name + ": Name should match #2");
     checkMetadata(test.name, v, test);
     is(v.readyState, v.HAVE_CURRENT_DATA, test.name + " checking readyState");
-    ok(v.readyState != v.NETWORK_LOADED, test.name + " shouldn't report NETWORK_LOADED");
+    is(v.networkState, v.NETWORK_IDLE, test.name + " checking networkState");
     ok(v.ended, test.name + " checking playback has ended");
 
     finish();
   }}(test, v);
 
 
   v.addEventListener("loadedmetadata", check, false);
   v.addEventListener("ended", checkEnded, false);