forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream'
- Loading branch information
Showing
427 changed files
with
7,023 additions
and
2,646 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
JSTests/microbenchmarks/array-prototype-with-contiguous.js
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,16 @@ | ||
function test(array, key, value) { | ||
array.with(key, value); | ||
} | ||
noInline(test); | ||
|
||
var array = [ | ||
{ value: 12 }, { value: 4 }, { value: 4 }, { value: 66 }, { value: 56 }, | ||
{ value: 44 }, { value: 44 }, { value: 38 }, { value: 65 }, { value: 89 }, | ||
{ value: 2 }, { value: 45 }, { value: 789 }, { value: 56 }, { value: 432 }, | ||
{ value: 677 }, { value: 2234 }, { value: 77 }, { value: 3457 }, { value: 133 }, | ||
{ value: 6544 }, { value: 76 }, { value: 17 }, { value: 322 }, { value: 34 } | ||
]; | ||
|
||
for (let i = 0; i < 1e6; ++i) { | ||
test(array, 14, { value: 34 }); | ||
} |
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,10 @@ | ||
function test(array, key, value) { | ||
array.with(key, value); | ||
} | ||
noInline(test); | ||
|
||
var array = [12.5, 4.5, 4.5, 66.5, 56.5, 44.5, 44.5, 38.5, 65.5, 89.5, 2.5, 45.5, 789.5, 56.5, 432.5, 677.5, 2234.5, 77.5, 3457.5, 133.5, 6544.5, 76.5, 17.5, 322.5, 34.5]; | ||
|
||
for (let i = 0; i < 1e6; ++i) { | ||
test(array, 14, 324.6); | ||
} |
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,10 @@ | ||
function test(array, key, value) { | ||
array.with(key, value); | ||
} | ||
noInline(test); | ||
|
||
var array = [12, 4, 4, 66, 56, 44, 44, 38, 65, 89, 2, 45, 789, 56, 432, 677, 2234, 77, 3457, 133, 6544, 76, 17, 322, 34]; | ||
|
||
for (let i = 0; i < 1e6; ++i) { | ||
test(array, 14, 324); | ||
} |
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,87 @@ | ||
function sameArray(a, b) { | ||
if (a.length !== b.length) | ||
throw new Error(`Expected length ${b.length} but got ${a.length}`); | ||
for (let i = 0; i < a.length; i++) { | ||
if (a[i] !== b[i]) { | ||
throw new Error(`Index ${i}: Expected ${b[i]} but got ${a[i]}`); | ||
} | ||
} | ||
} | ||
|
||
// ArrayWithInt32 * Int32 | ||
{ | ||
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
const newArr = arr.with(2, 12); | ||
sameArray(arr, [1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
sameArray(newArr, [1, 2, 12, 4, 5, 6, 7, 8, 9]); | ||
} | ||
|
||
// ArrayWithInt32 * Double | ||
{ | ||
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
const newArr = arr.with(2, 1.2); | ||
sameArray(arr, [1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
sameArray(newArr, [1, 2, 1.2, 4, 5, 6, 7, 8, 9]); | ||
} | ||
|
||
// ArrayWithInt32 * Contiguous | ||
{ | ||
const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]; | ||
const obj = {}; | ||
const newArr = arr.with(2, obj); | ||
sameArray(arr, [1, 2, 3, 4, 5, 6, 7, 8, 9]); | ||
sameArray(newArr, [1, 2, obj, 4, 5, 6, 7, 8, 9]); | ||
} | ||
|
||
// ArrayWithDouble * Int32 | ||
{ | ||
const arr = [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]; | ||
const newArr = arr.with(2, 12); | ||
sameArray(arr, [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
sameArray(newArr, [1.1, 1.2, 12, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
} | ||
|
||
// ArrayWithDouble * Double | ||
{ | ||
const arr = [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]; | ||
const newArr = arr.with(2, 12.1); | ||
sameArray(arr, [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
sameArray(newArr, [1.1, 1.2, 12.1, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
} | ||
|
||
// ArrayWithDouble * Other | ||
{ | ||
const arr = [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]; | ||
const obj = {}; | ||
const newArr = arr.with(2, obj); | ||
sameArray(arr, [1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
sameArray(newArr, [1.1, 1.2, obj, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]); | ||
} | ||
|
||
// ArrayWithContiguous * Int32 | ||
{ | ||
const shared = {}; | ||
const arr = [shared, shared, shared, shared, shared, shared, shared, shared, shared]; | ||
const newArr = arr.with(2, 12); | ||
sameArray(arr, [shared, shared, shared, shared, shared, shared, shared, shared, shared]); | ||
sameArray(newArr, [shared, shared, 12, shared, shared, shared, shared, shared, shared]); | ||
} | ||
|
||
// ArrayWithContiguous * Double | ||
{ | ||
const shared = {}; | ||
const arr = [shared, shared, shared, shared, shared, shared, shared, shared, shared]; | ||
const newArr = arr.with(2, 12.1); | ||
sameArray(arr, [shared, shared, shared, shared, shared, shared, shared, shared, shared]); | ||
sameArray(newArr, [shared, shared, 12.1, shared, shared, shared, shared, shared, shared]); | ||
} | ||
|
||
// ArrayWithContiguous * Other | ||
{ | ||
const shared = {}; | ||
const arr = [shared, shared, shared, shared, shared, shared, shared, shared, shared]; | ||
const obj2 = {}; | ||
const newArr = arr.with(2, obj2); | ||
sameArray(arr, [shared, shared, shared, shared, shared, shared, shared, shared, shared]); | ||
sameArray(newArr, [shared, shared, obj2, shared, shared, shared, shared, shared, shared]); | ||
} |
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
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
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
11 changes: 11 additions & 0 deletions
11
...ests/editing/selection/double-click-does-not-expand-selection-over-empty-div-expected.txt
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,11 @@ | ||
To manually run this test, double click inside the red box below and verify that no selection appears. | ||
|
||
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". | ||
|
||
|
||
PASS getSelection().type is not 'Range' | ||
PASS successfullyParsed is true | ||
|
||
TEST COMPLETE | ||
|
||
|
Oops, something went wrong.