Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: tools/telemetry/telemetry/core/bitmap_unittest.py

Issue 138143010: Revert "[telemetry] Implement per-pixel algorithms in Bitmap as a C++ extension." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/bitmap.py ('k') | tools/telemetry/telemetry/core/bitmaptools/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/bitmap_unittest.py
diff --git a/tools/telemetry/telemetry/core/bitmap_unittest.py b/tools/telemetry/telemetry/core/bitmap_unittest.py
index 9dba4b1498c3a812b92324c0f71ac8c7ba6887e2..b0b01f594b98907e5f03e5037bd6a90521081c5a 100644
--- a/tools/telemetry/telemetry/core/bitmap_unittest.py
+++ b/tools/telemetry/telemetry/core/bitmap_unittest.py
@@ -8,7 +8,7 @@ import unittest
from telemetry.core import bitmap
from telemetry.core import util
-from telemetry.unittest import DisabledTestOnCrOS
+from telemetry.unittest import DisabledTest
# This is a simple base64 encoded 2x2 PNG which contains, in order, a single
# Red, Yellow, Blue, and Green pixel.
@@ -50,7 +50,6 @@ class BitmapTest(unittest.TestCase):
file_bmp.GetPixelColor(0, 1).AssertIsRGB(0, 0, 255)
file_bmp.GetPixelColor(1, 0).AssertIsRGB(255, 255, 0)
- @DisabledTestOnCrOS
def testWritePngToPngFile(self):
orig = bitmap.Bitmap.FromPngFile(test_png_path)
temp_file = tempfile.NamedTemporaryFile().name
@@ -58,7 +57,6 @@ class BitmapTest(unittest.TestCase):
new_file = bitmap.Bitmap.FromPngFile(temp_file)
self.assertTrue(orig.IsEqual(new_file))
- @DisabledTestOnCrOS
def testWriteCroppedBmpToPngFile(self):
pixels = [255,0,0, 255,255,0, 0,0,0,
255,255,0, 0,255,0, 0,0,0]
@@ -69,12 +67,9 @@ class BitmapTest(unittest.TestCase):
new_file = bitmap.Bitmap.FromPngFile(temp_file)
self.assertTrue(orig.IsEqual(new_file))
- @DisabledTestOnCrOS
def testIsEqual(self):
bmp = bitmap.Bitmap.FromBase64Png(test_png)
file_bmp = bitmap.Bitmap.FromPngFile(test_png_path)
- self.assertTrue(bmp.IsEqual(file_bmp, tolerance=1))
- # Zero tolerance IsEqual has a different implementation.
self.assertTrue(bmp.IsEqual(file_bmp))
def testDiff(self):
@@ -107,7 +102,7 @@ class BitmapTest(unittest.TestCase):
diff_bmp.GetPixelColor(2, 1).AssertIsRGB(255, 255, 255)
diff_bmp.GetPixelColor(2, 2).AssertIsRGB(255, 255, 255)
- @DisabledTestOnCrOS
+ @DisabledTest
def testGetBoundingBox(self):
pixels = [0,0,0, 0,0,0, 0,0,0, 0,0,0,
0,0,0, 1,0,0, 1,0,0, 0,0,0,
@@ -121,7 +116,6 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(box, None)
self.assertEquals(count, 0)
- @DisabledTestOnCrOS
def testCrop(self):
pixels = [0,0,0, 1,0,0, 2,0,0, 3,0,0,
0,1,0, 1,1,0, 2,1,0, 3,1,0,
@@ -135,7 +129,7 @@ class BitmapTest(unittest.TestCase):
bmp.GetPixelColor(1, 0).AssertIsRGB(2, 2, 0)
self.assertEquals(bmp.pixels, bytearray([1,2,0, 2,2,0]))
- @DisabledTestOnCrOS
+ @DisabledTest
def testHistogram(self):
pixels = [1,2,3, 1,2,3, 1,2,3, 1,2,3,
1,2,3, 8,7,6, 5,4,6, 1,2,3,
@@ -154,7 +148,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(histogram[3 + 512], 0)
self.assertEquals(histogram[6 + 512], 4)
- @DisabledTestOnCrOS
+ @DisabledTest
def testHistogramIgnoreColor(self):
pixels = [1,2,3, 1,2,3, 1,2,3, 1,2,3,
1,2,3, 8,7,6, 5,4,6, 1,2,3,
@@ -171,7 +165,7 @@ class BitmapTest(unittest.TestCase):
self.assertEquals(histogram[3 + 512], 0)
self.assertEquals(histogram[6 + 512], 4)
- @DisabledTestOnCrOS
+ @DisabledTest
def testHistogramIgnoreColorTolerance(self):
pixels = [1,2,3, 4,5,6,
7,8,9, 8,7,6]
« no previous file with comments | « tools/telemetry/telemetry/core/bitmap.py ('k') | tools/telemetry/telemetry/core/bitmaptools/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698