Bug 1371395 Part 4: Test media emulation of an unsupported type. draft
authorBrad Werth <bwerth@mozilla.com>
Fri, 04 Aug 2017 17:06:27 -0700
changeset 643432 b99c89204b3b998c2463c08b554984defb3e1c82
parent 643431 b5a4ee4ae74c7863e995f9a1e29e52752e2e9891
child 643433 2edf3f37818fc9da4e24ce40bd3c07553e0681ca
push id73096
push userbwerth@mozilla.com
push dateWed, 09 Aug 2017 18:48:00 +0000
bugs1371395
milestone57.0a1
Bug 1371395 Part 4: Test media emulation of an unsupported type. MozReview-Commit-ID: L5tswjbGd97
devtools/client/commandline/test/browser_cmd_media.js
--- a/devtools/client/commandline/test/browser_cmd_media.js
+++ b/devtools/client/commandline/test/browser_cmd_media.js
@@ -48,16 +48,31 @@ var tests = {
             let color = content.getComputedStyle(content.document.body).backgroundColor;
             is(color, "rgb(255, 255, 0)", "media correctly emulated");
           });
         })
       }
     ]);
   },
 
+  testEmulateBadMedia: function (options) {
+    return helpers.audit(options, [
+      {
+        setup: "media emulate nonsense",
+        check: {
+          input:  "media emulate nonsense",
+          markup: "VVVVVVVVVVVVVVEEEEEEEE",
+          status: "ERROR",
+        },
+        output: "Can't use `nonsense`",
+        error: true
+      }
+    ]);
+  },
+
   testEndMediaEmulation: function (options) {
     return helpers.audit(options, [
       {
         setup: function () {
           let mDV = options.browser.markupDocumentViewer;
           mDV.emulateMedium("embossed");
           return helpers.setInput(options, "media reset");
         },