Reset maxCanvasPixelMemory between tests
https://bugs.webkit.org/show_bug.cgi?id=202941
<rdar://problem/56260865>

Attempt to fix flakiness.

* fast/canvas/canvas-too-large-to-draw-expected.txt:
* fast/canvas/canvas-too-large-to-draw.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 40721cf..d99cc8c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2019-10-15  Dean Jackson  <dino@apple.com>
+
+        Reset maxCanvasPixelMemory between tests
+        https://bugs.webkit.org/show_bug.cgi?id=202941
+        <rdar://problem/56260865>
+
+        Attempt to fix flakiness.
+
+        * fast/canvas/canvas-too-large-to-draw-expected.txt:
+        * fast/canvas/canvas-too-large-to-draw.html:
+
 2019-10-15  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [Clipboard API] Implement getType() for ClipboardItems created from bindings
diff --git a/LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt b/LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt
index d93d61f..4ccd6e4 100644
--- a/LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt
+++ b/LayoutTests/fast/canvas/canvas-too-large-to-draw-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 33: Total canvas memory use exceeds the maximum limit (15 MB).
+CONSOLE MESSAGE: line 31: Total canvas memory use exceeds the maximum limit (15 MB).
 This test requires Internals.
 
  
diff --git a/LayoutTests/fast/canvas/canvas-too-large-to-draw.html b/LayoutTests/fast/canvas/canvas-too-large-to-draw.html
index 5956007..8721407 100644
--- a/LayoutTests/fast/canvas/canvas-too-large-to-draw.html
+++ b/LayoutTests/fast/canvas/canvas-too-large-to-draw.html
@@ -23,8 +23,6 @@
         const MAX_WIDTH = 2000;
         const MAX_HEIGHT = MAX_WIDTH;
 
-        window.internals.setMaxCanvasPixelMemory(MAX_WIDTH * MAX_HEIGHT * 4);
-
         function fillCanvas(id, width, height) {
             const canvas = document.getElementById(id);
             canvas.width = width;
@@ -41,6 +39,8 @@
         // This one should always work.
         fillCanvas("canvas2", 10, 10);
 
+        window.internals.setMaxCanvasPixelMemory(MAX_WIDTH * MAX_HEIGHT * 4);
+
         // And this one should exceed the memory limit.
         fillCanvas("canvas1", MAX_WIDTH + 1, MAX_HEIGHT + 1);
     }