Bug 1235588 - add null check to SimpleTest. draft
authorJW Wang <jwwang@mozilla.com>
Wed, 30 Dec 2015 15:23:53 +0800
changeset 318003 063280a904266d5a3aefeb79f8461351debb751d
parent 317763 7c83da46ea740bc14028aca9f9a662f062de5586
child 512398 c07dcd907109c4ba2f20772fb3a54947d85087d7
push id8807
push userjwwang@mozilla.com
push dateWed, 30 Dec 2015 09:59:02 +0000
bugs1235588
milestone46.0a1
Bug 1235588 - add null check to SimpleTest.
dom/media/test/manifest.js
--- a/dom/media/test/manifest.js
+++ b/dom/media/test/manifest.js
@@ -1555,9 +1555,13 @@ function setMediaTestsPrefs(callback, ex
   SpecialPowers.pushPrefEnv({"set": prefs}, callback);
 }
 
 // B2G emulator and Android 2.3 are condidered slow platforms
 function isSlowPlatform() {
   return SpecialPowers.Services.appinfo.name == "B2G" || getAndroidVersion() == 10;
 }
 
-SimpleTest.requestFlakyTimeout("untriaged");
+// Could be undefined in a page opened by the parent test page
+// like file_access_controls.html.
+if ("SimpleTest" in window) {
+  SimpleTest.requestFlakyTimeout("untriaged");
+}