Bug 944162 - Added assertIsPixel and assertIsNotPixel wrappers to AssertionHelper.java. r=mcomella
☠☠ backed out by 7713c80c1028 ☠ ☠
authorIsura Edirisinghe <isurae@gmail.com>
Sun, 08 Dec 2013 21:57:00 -0500
changeset 174193 97d17b777f684ce75022586c71a98bc8b178802e
parent 174192 8dc4d9276c7a278aa6c537de680ed2ef40ce1d0e
child 174194 b372181af8e76191b5202590cb66cd3d822d3bbd
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs944162
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 944162 - Added assertIsPixel and assertIsNotPixel wrappers to AssertionHelper.java. r=mcomella
mobile/android/base/tests/helpers/AssertionHelper.java
--- a/mobile/android/base/tests/helpers/AssertionHelper.java
+++ b/mobile/android/base/tests/helpers/AssertionHelper.java
@@ -2,17 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.tests.helpers;
 
 import org.mozilla.gecko.Assert;
 import org.mozilla.gecko.tests.UITestContext;
 
-// TODO: Add ispixel assertions.
 /**
  * Provides assertions in a JUnit-like API that wraps the robocop Assert interface.
  */
 public final class AssertionHelper {
     // Assert.ok has a "diag" ("diagnostic") parameter that has no useful purpose.
     private static final String DIAG_STRING = "";
 
     private static Assert sAsserter;
@@ -42,12 +41,20 @@ public final class AssertionHelper {
     public static void assertNull(final String message, final Object actual) {
         sAsserter.is(actual, null, message);
     }
 
     public static void assertTrue(final String message, final boolean actual) {
         sAsserter.ok(actual, message, DIAG_STRING);
     }
 
+    public static void assertIsPixel(final string message, final int actual, final int r, final int g, final int b) {
+	sAsserter.ispixel(actual, r, g, b, message);
+    }
+
+    public static void assertIsNotPixel(final string message, final int actual, final int r, final int g, final int b) {
+	sAsserter.isnotpixel(actual, r, g, b, message);
+    }
+
     public static void fail(final String message) {
         sAsserter.ok(false, message, DIAG_STRING);
     }
 }