forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import wpt@956bd8fc1960bc574dcd1aebf3a33131d05f80b4
Using wpt-import in Chromium 8c0f6ea. With Chromium commits locally applied on WPT: f79c6fe "Reimplementing getDatabaseNames() as databases() for indexeddb." Build: https://ci.chromium.org/buildbot/chromium.infra.cron/wpt-importer/26607 Note to sheriffs: This CL imports external tests and adds expectations for those tests; if this CL is large and causes a few new failures, please fix the failures by adding new lines to TestExpectations rather than reverting. See: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md Directory owners for changes in this CL: [email protected]: external/wpt/css/css-flexbox NOAUTOREVERT=true TBR=markdittmer No-Export: true Change-Id: I6dc6392e83ff5d7092def49b12ac8e19eddbf28f Reviewed-on: https://chromium-review.googlesource.com/c/1296310 Commit-Queue: Blink WPT Bot <[email protected]> Reviewed-by: Blink WPT Bot <[email protected]> Cr-Commit-Position: refs/heads/master@{#601924}
- Loading branch information
1 parent
6b18d3d
commit 99379b7
Showing
10 changed files
with
2,609 additions
and
12 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
third_party/WebKit/LayoutTests/external/wpt/selection/addRange.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE HTML> | ||
<meta charset=utf-8> | ||
<title>Selection: Add a range to the selection</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
window.onload = function() { | ||
test(function() { | ||
var selection = window.getSelection(); | ||
var p = document.querySelector("p"); | ||
|
||
var range = document.createRange(); | ||
range.selectNode(p); | ||
selection.addRange(range); | ||
|
||
// In Safari the anchorNode is the Text node, elsewhere it's the Element. | ||
assert_equals(selection.anchorNode, document.body); | ||
assert_equals(selection.anchorOffset, 1); | ||
assert_equals(selection.focusNode, document.body); | ||
assert_equals(selection.focusOffset, 2); | ||
assert_equals(selection.isCollapsed, range.collapsed); | ||
assert_equals(selection.rangeCount, 1); | ||
}); | ||
}; | ||
</script> | ||
<body> | ||
<p>Add a range to the selection</p> | ||
</body> | ||
</html> |
28 changes: 28 additions & 0 deletions
28
third_party/WebKit/LayoutTests/external/wpt/selection/stringifier.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE HTML> | ||
<meta charset=utf-8> | ||
<title>Selection: stringifier</title> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
window.onload = () => { | ||
test(() => { | ||
const selection = getSelection(); | ||
const p = document.querySelector("p"); | ||
|
||
const range = document.createRange(); | ||
range.selectNode(p); | ||
selection.addRange(range); | ||
|
||
// In Chrome there are trailing \n characters. There is no spec for the | ||
// stringifier, just a link to | ||
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=10583 | ||
assert_equals(selection.toString(), "foo bar"); | ||
}); | ||
}; | ||
</script> | ||
<!-- The structure of the document matters, in particular making this look like | ||
in addRange.htm would mask the problem. --> | ||
<body> | ||
<p>foo bar</p> | ||
</body> | ||
</html> |
Oops, something went wrong.