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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Selection/use-counters.html

Issue 1509353004: Add UseCounters for Selection methods that take null (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/DOMSelection.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Selection UseCounters</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 <script>
6 test(function() {
7 var SelectionCollapseNull = 1083; // From UseCounter.h
8 assert_false(internals.isUseCounted(document, SelectionCollapseNull));
9 document.getSelection().collapse(null, -1);
10 assert_true(internals.isUseCounted(document, SelectionCollapseNull));
11 }, 'selection.collapse(null, -1)');
12
13 test(function() {
14 var SelectionSetBaseAndExtentNull = 1084; // From UseCounter.h
15 assert_false(internals.isUseCounted(document, SelectionSetBaseAndExtentNull));
16 assert_throws('IndexSizeError', function() {
17 document.getSelection().setBaseAndExtent(null, -1, null, -1);
18 });
19 assert_false(internals.isUseCounted(document, SelectionSetBaseAndExtentNull));
20 document.getSelection().setBaseAndExtent(null, 0, null, 0)
21 assert_true(internals.isUseCounted(document, SelectionSetBaseAndExtentNull));
22 }, 'selection.setBaseAndExtent(null, 0, null, 0)');
23 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/DOMSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698