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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html

Issue 2665823002: Invalidate caret during paint invalidation (Closed)
Patch Set: NeedsRebaseline Created 3 years, 10 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
Index: third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html
index fb6ade7827c8484fa0162c276049f22b48675775..8e5c2676850a9ab18d03731476eaa00d234e9e55 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/invalidate-caret-before-text-node-update.html
@@ -1,33 +1,21 @@
<!doctype HTML>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
+<script src="resources/text-based-repaint.js"></script>
<div contenteditable id="root" class="editing"></div>
<style>
* {
- font-family: Courier New;
+ font-family: Courier New;
}
</style>
<script>
-test(function() {
- // The innerText must be set explicitly, and not with an editing command.
- root.innerText = "1";
- window.getSelection().collapse(root.firstChild, 1);
+onload = function() {
+ // The innerText must be set explicitly, and not with an editing command.
+ root.innerText = "1";
+ window.getSelection().collapse(root.firstChild, 1);
+
+ runRepaintAndPixelTest();
+};
- if (window.internals)
- window.internals.startTrackingRepaints(document);
-
- debugger;
- document.execCommand('delete');
-
- if (window.internals) {
- var layers = JSON.parse(window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_PAINT_INVALIDATIONS))["layers"]
- assert_equals(layers[0].paintInvalidations[2].reason, "invalidate paint rectangle");
- var previousOffset = layers[0].paintInvalidations[2].rect[0];
- assert_equals(layers[0].paintInvalidations[2].rect[3], 20, "Old caret rect location");
-
- assert_equals(layers[0].paintInvalidations[3].reason, "invalidate paint rectangle");
- // Check that thet x offset is previousOffset - 1. This for the caret rect after delete.
- assert_not_equals(layers[0].paintInvalidations[3].rect[0], previousOffset, "New caret rect location");
- }
-});
+function repaintTest() {
+ document.execCommand('delete');
+}
</script>

Powered by Google App Engine
This is Rietveld 408576698