-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add in tests for non-native dataview
This includes a new module that will run about 1 out of every 3 runs that will make sure the browser DataView is replaced with an object. Without the updates to supportsDataView this would fail since stringTagBug would try to call the constructor on it.
- Loading branch information
Showing
5 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(function() { | ||
function overrideDataView() { | ||
NativeDataView = DataView; | ||
DataView = {}; | ||
} | ||
|
||
// Only override browser functions roughly 1/3rd of the time | ||
var runOverrides = Math.floor(Math.random() * 3) === 0; | ||
if (runOverrides) { | ||
overrideDataView(); | ||
} | ||
})(); |