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

Unified Diff: LayoutTests/fast/text/selection-exceptions.html

Issue 1195833002: Selection attributes changes from long to unsigned long (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes offset error message Created 5 years, 6 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: LayoutTests/fast/text/selection-exceptions.html
diff --git a/LayoutTests/fast/text/selection-exceptions.html b/LayoutTests/fast/text/selection-exceptions.html
index 98b1789db682e57161d2c65fac44eebbf6bd43ed..03badde6c9fbb296b1503a30a3d286fda5cb9e8f 100644
--- a/LayoutTests/fast/text/selection-exceptions.html
+++ b/LayoutTests/fast/text/selection-exceptions.html
@@ -7,21 +7,21 @@
<script>
description("This tests that 'Selection' methods throw exceptions with reasonable messages.");
- shouldThrow('getSelection().collapse(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'collapse\' on \'Selection\': -1 is not a valid offset."');
+ shouldThrow('getSelection().collapse(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'collapse\' on \'Selection\': 4294967295 is larger than the given node\'s length."');
getSelection().empty();
shouldThrow('getSelection().collapseToStart()', '"InvalidStateError: Failed to execute \'collapseToStart\' on \'Selection\': there is no selection."');
shouldThrow('getSelection().collapseToEnd()', '"InvalidStateError: Failed to execute \'collapseToEnd\' on \'Selection\': there is no selection."');
- shouldThrow('getSelection().setBaseAndExtent(document.documentElement, -1, document.documentElement, 0)', '"IndexSizeError: Failed to execute \'setBaseAndExtent\' on \'Selection\': -1 is not a valid base offset."');
- shouldThrow('getSelection().setBaseAndExtent(document.documentElement, 0, document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setBaseAndExtent\' on \'Selection\': -1 is not a valid extent offset."');
+ shouldThrow('getSelection().setBaseAndExtent(document.documentElement, -1, document.documentElement, 0)', '"IndexSizeError: Failed to execute \'setBaseAndExtent\' on \'Selection\': 4294967295 is larger than the base node\'s length."');
+ shouldThrow('getSelection().setBaseAndExtent(document.documentElement, 0, document.documentElement, -1)', '"IndexSizeError: Failed to execute \'setBaseAndExtent\' on \'Selection\': 4294967295 is larger than the extent node\'s length."');
- shouldThrow('getSelection().collapse(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'collapse\' on \'Selection\': -1 is not a valid offset."');
+ shouldThrow('getSelection().collapse(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'collapse\' on \'Selection\': 4294967295 is larger than the given node\'s length."');
- shouldThrow('getSelection().getRangeAt(-1)', '"IndexSizeError: Failed to execute \'getRangeAt\' on \'Selection\': -1 is not a valid index."');
+ shouldThrow('getSelection().getRangeAt(-1)', '"IndexSizeError: Failed to execute \'getRangeAt\' on \'Selection\': 4294967295 is not a valid index."');
shouldThrow('getSelection().extend(0, -1)', '"TypeError: Failed to execute \'extend\' on \'Selection\': parameter 1 is not of type \'Node\'."');
- shouldThrow('getSelection().extend(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'extend\' on \'Selection\': -1 is not a valid offset."');
+ shouldThrow('getSelection().extend(document.documentElement, -1)', '"IndexSizeError: Failed to execute \'extend\' on \'Selection\': 4294967295 is larger than the given node\'s length."');
shouldThrow('getSelection().extend(document.documentElement, 1000)', '"IndexSizeError: Failed to execute \'extend\' on \'Selection\': 1000 is larger than the given node\'s length."');
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698