Skip to content

Commit

Permalink
add selection.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
giabao committed Apr 20, 2019
1 parent 4fd64b4 commit 9ed1761
Show file tree
Hide file tree
Showing 6 changed files with 407 additions and 335 deletions.
3 changes: 2 additions & 1 deletion test/classapplier/index.iife.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>QUnit Example</title>
<!-- load rangy2 here in `head` to verify that rangy2 can init without need dom ready -->
<script src="../../dist/core/bundles/index.umd.min.js"></script>
<script src="../../node_modules/qunit/qunit/qunit.js"></script>
<link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="../../dist/core/bundles/index.umd.js"></script>
<script src="../../dist/classapplier/bundles/index.umd.js"></script>
<script src="index.test.iife.js"></script>
</body>
Expand Down
4 changes: 3 additions & 1 deletion test/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta name="referrer" content="no-referrer" />
<title>QUnit Example</title>
<!-- load rangy2 here in `head` to verify that rangy2 can init without need dom ready -->
<script src="../../dist/core/bundles/index.umd.js"></script>
<script src="../../node_modules/qunit/qunit/qunit.js"></script>
<link rel="stylesheet" href="../../node_modules/qunit/qunit/qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="../../dist/core/bundles/index.umd.js"></script>
<script src="dom.test.iife.js"></script>
<script src="range.test.iife.js"></script>
<script src="selection.test.iife.js"></script>
Expand Down
22 changes: 11 additions & 11 deletions test/core/range.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1604,20 +1604,20 @@ function testAcid3(rangeCreator, rangeCreatorName) {
});*/
}

// testRangeCreator([document], "main", createRangyRange, "Rangy Range");
testRangeCreator([document], "main", createRangyRange, "Rangy Range");
testRangeCreator([document], "main", createWrappedNativeDomRange, "Wrapped native Range");

// if (hasNativeDomRange) {
// testRangeCreator([document], "main", createNativeDomRange, "native Range");
// }
//
if (hasNativeDomRange) {
testRangeCreator([document], "main", createNativeDomRange, "native Range");
}

var iframeDoc = [];
// testRangeCreator(iframeDoc, "iframe", createRangyRange, "Rangy Range");
// testRangeCreator(iframeDoc, "iframe", createWrappedNativeDomRange, "Wrapped native Range");
//
// if (hasNativeDomRange) {
// testRangeCreator(iframeDoc, "iframe", createNativeDomRange, "native Range");
// }
testRangeCreator(iframeDoc, "iframe", createRangyRange, "Rangy Range");
testRangeCreator(iframeDoc, "iframe", createWrappedNativeDomRange, "Wrapped native Range");

if (hasNativeDomRange) {
testRangeCreator(iframeDoc, "iframe", createNativeDomRange, "native Range");
}

var iframeEl;

Expand Down
Loading

0 comments on commit 9ed1761

Please sign in to comment.